@tocca-systems/twp-cli 0.89.0 → 0.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.public.md +12 -0
- package/README.md +43 -0
- package/dist/{agent-76ZH3E67.js → agent-IVJ5DCFU.js} +1 -1
- package/dist/{analysis-CUXB6NQF.js → analysis-DIWOPBN6.js} +2 -2
- package/dist/{announcement-4YNKKG5V.js → announcement-KOXBNHSN.js} +1 -1
- package/dist/{api-command-QS6VCLTX.js → api-command-OJORMKTD.js} +3 -3
- package/dist/{app-GWNEJ24L.js → app-V6K6YNWR.js} +4 -4
- package/dist/{attendance-correct-KOTYM2DS.js → attendance-correct-XM26CE65.js} +1 -1
- package/dist/{attendance-lists-QUSNJQV2.js → attendance-lists-VNAHH3R4.js} +1 -1
- package/dist/{backlog-CNTVVRZ6.js → backlog-LCGG5HRB.js} +1 -1
- package/dist/{budget-X3OMSO3F.js → budget-OYBU4JFH.js} +1 -1
- package/dist/{chunk-Y7GYWZLW.js → chunk-23MEOBJF.js} +1 -1
- package/dist/{chunk-RIEBWMKF.js → chunk-5STCZEOX.js} +1 -1
- package/dist/chunk-62GRAKUD.js +38 -0
- package/dist/{chunk-OP5WINVG.js → chunk-AVOZLZA5.js} +1 -1
- package/dist/chunk-C6U2CGX7.js +4 -0
- package/dist/{chunk-LS7DFMG6.js → chunk-EGOE26U7.js} +1 -1
- package/dist/{chunk-DADDMUI5.js → chunk-EQTXWU2Y.js} +1 -1
- package/dist/{chunk-7KD5RWFY.js → chunk-EQXJOEOK.js} +1 -1
- package/dist/{chunk-PWKWXZDZ.js → chunk-FCC7JJR5.js} +1 -1
- package/dist/{chunk-34TCAKT5.js → chunk-GLOGPK4Y.js} +1 -1
- package/dist/{chunk-7KD24ABA.js → chunk-H7XVCIL7.js} +1 -1
- package/dist/{chunk-5PBNMFNO.js → chunk-IWY2SNST.js} +1 -1
- package/dist/{chunk-2T23XGJF.js → chunk-M36DAHMH.js} +61 -56
- package/dist/{chunk-IWYJSQ5I.js → chunk-M763HXDH.js} +1 -1
- package/dist/{chunk-KW37N7IO.js → chunk-MPGJU5A7.js} +1 -1
- package/dist/{chunk-6FGQNFUV.js → chunk-NYQYDX7G.js} +1 -1
- package/dist/{chunk-EGFVST6P.js → chunk-P673SKUV.js} +33 -14
- package/dist/{chunk-TVISFCQN.js → chunk-T3PYPLTG.js} +106 -24
- package/dist/{chunk-2L2EGIWR.js → chunk-T7MUDWUH.js} +1 -1
- package/dist/{chunk-FM3RHTEQ.js → chunk-U2CRCBJ3.js} +1 -1
- package/dist/{chunk-WGAEYNZQ.js → chunk-U3XIH7WP.js} +1 -1
- package/dist/{chunk-NLDVB4PZ.js → chunk-U6KPYJTM.js} +1 -1
- package/dist/{chunk-E3UET43F.js → chunk-UCPK53K4.js} +1 -1
- package/dist/{chunk-733XATRJ.js → chunk-VLBWNFQW.js} +1 -1
- package/dist/chunk-Y5XM6W3S.js +12 -0
- package/dist/{chunk-WJJW7VX7.js → chunk-YPS5XHYE.js} +1 -1
- package/dist/{chunk-JA7DLMKJ.js → chunk-ZTDDOUS4.js} +3 -3
- package/dist/cli.js +37 -9
- package/dist/{commands-3B5GGPY7.js → commands-ULMFP3LH.js} +20 -19
- package/dist/{company-3227PJ3Q.js → company-BW3U437C.js} +2 -2
- package/dist/{completion-32FJZVQR.js → completion-636S3VU3.js} +1 -1
- package/dist/{contract-H5QWWRB3.js → contract-2MANNVJT.js} +1 -1
- package/dist/{department-NIUPNDHH.js → department-LT3IM65L.js} +1 -1
- package/dist/{deposit-HUFSDRRK.js → deposit-RYRCQ2U7.js} +1 -1
- package/dist/{domain-knowledge-M4Y7744J.js → domain-knowledge-Q2YMI7I2.js} +1 -1
- package/dist/{estimate-BIGMD2NU.js → estimate-MMS326SE.js} +2 -2
- package/dist/{evaluation-L4L23IY2.js → evaluation-KSZPNKBM.js} +2 -2
- package/dist/{expense-JKENK2W2.js → expense-J7KGZKLH.js} +1 -1
- package/dist/faq-FJUCNBEB.js +68 -0
- package/dist/{fiscal-year-G45WHCZC.js → fiscal-year-AFO5CWDN.js} +1 -1
- package/dist/{holiday-EW62DVPW.js → holiday-KF2RVJSU.js} +1 -1
- package/dist/{inquiry-QGUOVO77.js → inquiry-IAAJYTXP.js} +1 -1
- package/dist/{invoice-ZWUU3FSZ.js → invoice-A3X3JF2H.js} +2 -2
- package/dist/{job-title-CXCW7BAP.js → job-title-PF4C6D6U.js} +1 -1
- package/dist/{knowledge-PBFDM5WJ.js → knowledge-2YF7CJKA.js} +6 -6
- package/dist/{leave-CXTBZFIC.js → leave-2JNN3V3D.js} +2 -2
- package/dist/{license-7WE7UPVX.js → license-MRXITCY7.js} +1 -1
- package/dist/{media-FM53QOC2.js → media-IQ2AIN67.js} +3 -3
- package/dist/{notification-Z2VMBWO3.js → notification-4YXX6H3D.js} +1 -1
- package/dist/{oneshot-YDTQT2T3.js → oneshot-ZCGHYKQM.js} +1 -1
- package/dist/{outlook-ILJN562M.js → outlook-ZRFSKSJ3.js} +1 -1
- package/dist/{position-CLQVRA7Y.js → position-M2MEJBUK.js} +1 -1
- package/dist/{project-OTJCVFOW.js → project-EF2JKWVC.js} +1 -1
- package/dist/{prospect-3EHNELGI.js → prospect-R6346ME5.js} +1 -1
- package/dist/{purchase-MMUXAEER.js → purchase-XCTYVG4N.js} +2 -2
- package/dist/{receivable-E52RNQTW.js → receivable-FVLXVO2S.js} +1 -1
- package/dist/{redmine-CKXEOH7Q.js → redmine-EUFN35BT.js} +1 -1
- package/dist/{registry-A7OXOQPI.js → registry-TGKZPLKO.js} +1 -1
- package/dist/{report-UTVGNCLP.js → report-6Q3JV4DN.js} +1 -1
- package/dist/{run-VNV2AVDI.js → run-3UJFGBQR.js} +2 -2
- package/dist/{runner-command-YIAPRXZP.js → runner-command-GN45H7TL.js} +1 -1
- package/dist/{sales-ai-review-XFMAKAOH.js → sales-ai-review-TTWTHKQJ.js} +1 -1
- package/dist/{sales-master-I6X4WFV3.js → sales-master-VKS2HENV.js} +2 -2
- package/dist/{sales-numbering-P3JG4UPD.js → sales-numbering-W2W57UPY.js} +1 -1
- package/dist/{search-KFMYAVLM.js → search-N45JL2PU.js} +1 -1
- package/dist/{segment-LCZFL6QE.js → segment-3MKCPWT2.js} +1 -1
- package/dist/{skill-GK2WADKA.js → skill-Z3DEECEK.js} +1 -1
- package/dist/{skill-check-VNUNX6IO.js → skill-check-3RWESZ4O.js} +1 -1
- package/dist/{staffing-board-5YHU7V6Z.js → staffing-board-LWUCHN7P.js} +2 -2
- package/dist/{status-command-2FL2SVFR.js → status-command-XOELHUCV.js} +1 -1
- package/dist/{supplier-payment-V4KRH7VA.js → supplier-payment-AUT2FZBR.js} +2 -2
- package/dist/{support-FU5M5LM3.js → support-OUQWV5KP.js} +1 -1
- package/dist/{task-PFSBL4A3.js → task-7FOEUQJ6.js} +2 -2
- package/dist/{teams-43CJTQHL.js → teams-FOR3O7KH.js} +1 -1
- package/dist/{user-5KHSDIVN.js → user-TRXOR2Q6.js} +2 -2
- package/dist/{user-contract-type-4JXN7B7J.js → user-contract-type-MPZQ7Y2P.js} +1 -1
- package/dist/{worker-agent-4TVU6AES.js → worker-agent-4E5P75SJ.js} +1 -1
- package/dist/{workflow-U5YJ2I6L.js → workflow-G7QZZPAX.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-C7MO3RHJ.js +0 -37
- package/dist/chunk-DG7JPFYK.js +0 -12
- package/dist/chunk-JF2GCXNQ.js +0 -4
- /package/dist/{capacity-list-command-LKOVLAY4.js → capacity-list-command-GFHEKY47.js} +0 -0
- /package/dist/{chunk-NMERFYLD.js → chunk-RY27USNC.js} +0 -0
- /package/dist/{commands-RBN5WGWJ.js → commands-FOEEAVJQ.js} +0 -0
- /package/dist/{skill-manage-command-E7M7ZSQP.js → skill-manage-command-Z4MLSACA.js} +0 -0
package/CHANGELOG.public.md
CHANGED
|
@@ -11,6 +11,18 @@
|
|
|
11
11
|
`CHANGELOG.md` に残してあります。顧客向けの履歴は public 公開以降を対象とします。
|
|
12
12
|
-->
|
|
13
13
|
|
|
14
|
+
## 0.90.0
|
|
15
|
+
|
|
16
|
+
`twp project template` で、プロジェクトテンプレートの一覧・作成・変更・削除、既存プロジェクトからのテンプレート作成、テンプレートからの新しいプロジェクト作成をコマンドから行えるようになりました。
|
|
17
|
+
|
|
18
|
+
`twp workflow instance create --dry-run` で、申請を作る前に承認の段と承認者を確認できるようになりました(ワークフローの管理者向け)。
|
|
19
|
+
|
|
20
|
+
`twp faq` で、社内FAQの一覧・表示・質問文での検索と、登録・変更・削除・添付ファイルの登録をコマンドから行えるようになりました。
|
|
21
|
+
|
|
22
|
+
ナレッジ(wiki)のページから見出しの一覧や1つの節だけを取り出すとき、コードブロックの中の「#」で始まる行を見出しと取り違えることがなくなりました。
|
|
23
|
+
|
|
24
|
+
タスクループを管理者以外のアカウントで動かしているとき、そのアカウントから見えないキュー項目が残っているだけで次の計画が止まることがなくなりました。
|
|
25
|
+
|
|
14
26
|
## 0.89.0
|
|
15
27
|
|
|
16
28
|
評価期間の作成・変更・削除・締め・締め解除、評価基準(A〜E の説明)の表示・置き換え、役割テンプレートの一覧・作成・変更・削除を CLI から行えるようになりました。
|
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ TWP(Tocca Working Platform)を、ターミナルから使うための CLI
|
|
|
30
30
|
| **できる** | `twp worker-agent` によるワーカーエージェント(AIエージェント)の参照(一覧・詳細・スケジュールと次回実行予定・許可できるツールのカタログ・実行回数の上限と今日の使用数)と、実行履歴・実行結果(最終要約を先頭に)・ステップログ・ステップの集計の読み取りと、作成・更新(スケジュール指定込み)・削除・有効化/無効化・今すぐ実行(`--wait` で終わるまで待つ)・実行の取消 |
|
|
31
31
|
| **できる** | `twp search` による TWP 内のコンテンツ(タスク・Wiki・ノート・議事録・FAQ・サポート・ワークフロー等)の横断検索(通常検索と `--ai` の AI検索・種類/プロジェクト/タグ/状態/カテゴリで絞り込み)と、検索できる種類の一覧。閲覧権限の無いものは出ません |
|
|
32
32
|
| **できる** | `twp announcement` による自分に届いているお知らせ(運営・組織)の一覧(未読・確認待ち・語で絞り込み)・本文と返信の表示・未読件数、既読化(1件ずつ・まとめて)・「確認しました」の記録・返信の一覧と投稿 |
|
|
33
|
+
| **できる** | `twp faq` による社内FAQの一覧(語・カテゴリで絞り込み)・質問と回答の表示・質問文からの検索(根拠のFAQまで。回答文は作りません)・カテゴリの一覧と、登録・更新・削除・添付(添付ファイル欄・本文へ差し込む画像/PDF)。公開対象に含まれるFAQだけが見え、書き込みは「社内FAQ管理」の管理者の権限が要ります |
|
|
33
34
|
| **できる** | `twp agent session` によるコンテナエージェント(リポジトリで作業する AI セッション)の起動・追加の指示・再開・停止・削除と、状態・作業ブランチ・PR・会話・実行ログ・変更ファイル(差分)の参照、`twp agent repository` による起動できるリポジトリとブランチの一覧、`twp agent schedule` による定期実行の定義の作成・更新・有効化/無効化・削除・今すぐ実行と実行履歴の参照。`--wait` で作業が止まるまで待ち、最後のアシスタント発言・作業ブランチ・PR URL を出します。起動・指示・再開は AI クレジットを消費します |
|
|
34
35
|
| **できる** | `twp estimate` / `twp invoice` による販売管理の見積・請求の一覧(語・ステータス・取引先・プロジェクト・担当者・日付・回収状況で絞り込み)と詳細。販売管理・顧客管理の権限が要ります |
|
|
35
36
|
| **できる** | `twp estimate` による見積の作成・更新・削除・社内共有メモ・既存の請求の紐づけ・関連入金・部署按分・案件書類(注文書・個別契約書など)の登録・版の差替え・ダウンロードと、注文書からの注文書番号の読み取り・見積書/注文書/注文請書の PDF の書き出し。販売管理・顧客管理の権限が要ります |
|
|
@@ -238,6 +239,25 @@ twp project member alias <別名> | --clear [--project <コード>] # 自分
|
|
|
238
239
|
- `create` の相手はテナントのユーザー(`twp user` と同じ指定方法)、それ以外の相手はそのプロジェクトのメンバー(氏名・メールアドレス・ID・`me`。別名では指定できません)です。誰に送るかは送る前に表示します
|
|
239
240
|
- `delete` は担当中のタスクの担当者を変えません。参画を終えるだけなら `update --end-date` を使ってください
|
|
240
241
|
|
|
242
|
+
### プロジェクトテンプレートを使う
|
|
243
|
+
|
|
244
|
+
画面の「各種マスタ設定 > プロジェクトテンプレート」と同じものを扱います。一覧・詳細はプロジェクト機能の閲覧者以上、それ以外はプロジェクト機能の管理者権限が要ります。
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
twp project template list
|
|
248
|
+
twp project template get <テンプレート> # 構成の件数。中身は --output json
|
|
249
|
+
twp project template create --name <名前> [--category <分類>] [--develop-method 0|1|2] [--description-file <パス>] [--configs-file <パス>]
|
|
250
|
+
twp project template update <テンプレート> [項目…] [--configs-file <パス>] [--no-description|--no-code|--no-category|--no-develop-method]
|
|
251
|
+
twp project template delete <テンプレート> --yes
|
|
252
|
+
twp project template from-project <コード|ID> --name <名前> [--category <分類>] # 既存プロジェクトの構成を写す
|
|
253
|
+
twp project template apply <テンプレート> --code <コード> --name <名前> [--start-date <日付>] [--end-date <日付>] [--manager <ユーザー>] [--department <部署>] [--memo-file <パス>]
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
- **`apply` は既存のプロジェクトに適用するのではなく、テンプレートから新しいプロジェクトを作ります。** 送る前にステータス・種別・カテゴリ・ラベル・マイルストーン・タスクがそれぞれ何件作られるかを表示します(`--dry-run` でも出ます)
|
|
257
|
+
- `<テンプレート>` は ID・名前・コードで指定できます
|
|
258
|
+
- `--configs-file` は `settings` / `status_configs` / `type_configs` / `category_configs` / `label_configs` / `milestone_templates` / `task_templates` をキーに持つ JSON です。**書いたキーは中身ごと置き換わります**(書かなかったキーは変わりません)。構成以外のキー(`id` / `name` 等)や伏字マーカーを含むファイルは送らずに止めます。今の構成は `get --output json --no-redact --query "{status_configs: status_configs}"` のように構成のキーだけを取り出してください
|
|
259
|
+
- `from-project` は公開範囲を絞ったタスクを写しません
|
|
260
|
+
|
|
241
261
|
### テナントのユーザーと所属を参照する
|
|
242
262
|
|
|
243
263
|
組織管理者(総務)向けに、ユーザーの一覧・詳細と所属の履歴を引きます。
|
|
@@ -991,6 +1011,27 @@ twp announcement reply create <お知らせID> --body-file <ファイル|->
|
|
|
991
1011
|
- 返信は返信を受け付けていて掲載中の組織のお知らせにだけ送れます(2,000 文字まで・作成者へ通知が届きます)。返信の削除・お知らせの作成と配信はまだありません(`twp api` で到達できます)
|
|
992
1012
|
- ヘルプは `twp announcement help`
|
|
993
1013
|
|
|
1014
|
+
### 社内FAQを読む・登録する
|
|
1015
|
+
|
|
1016
|
+
```
|
|
1017
|
+
twp faq list [--keyword <語>] [--category <カテゴリ>]
|
|
1018
|
+
twp faq get <FAQのID> [--output text]
|
|
1019
|
+
twp faq search "<質問文>" [--top-k <件数>]
|
|
1020
|
+
twp faq categories
|
|
1021
|
+
twp faq create --question <質問> --answer-file <パス> --category <カテゴリ> [--answer-format markup|html] [--visibility all|targets --targets-file <パス>] [--assignee <ユーザー>] [--attachment <添付ID>…]
|
|
1022
|
+
twp faq update <FAQのID> [項目…] [--no-assignee] [--no-attachments]
|
|
1023
|
+
twp faq delete <FAQのID> --yes
|
|
1024
|
+
twp faq attachment upload --file <パス> # 添付ファイル欄に付ける(30分以内に --attachment で付ける)
|
|
1025
|
+
twp faq attachment embed --file <パス> # 回答本文へ差し込む画像・PDF(返ったマーカー行を本文に入れる)
|
|
1026
|
+
```
|
|
1027
|
+
|
|
1028
|
+
- 自分が公開対象に含まれるFAQだけが見えます(公開対象外の `get` は「見つかりません」)。登録・更新・削除・添付は「社内FAQ管理」の管理者の権限が要ります
|
|
1029
|
+
- `search` は画面の「AIに質問」の検索部分です。根拠のFAQと回答本文(平文)を返し、回答文の生成はしません。当たらなければ問い合わせ先のFAQを返します
|
|
1030
|
+
- `--category` はコードでも表示名でも指定できます(`twp faq categories`)
|
|
1031
|
+
- `update` は指定した項目だけを変えます。`--answer-format` は回答と一緒にだけ指定できます。`--attachment` は添付ファイル欄を置き換え、いま付いている添付が外れるときは警告して `--yes` を求めます(外れた添付はサーバが削除します)
|
|
1032
|
+
- `--targets-file` は公開対象の JSON 配列です(`get --output json` の `visibility_targets` をそのまま使えます)
|
|
1033
|
+
- ヘルプは `twp faq help`
|
|
1034
|
+
|
|
994
1035
|
### メディアライブラリのファイルを扱う
|
|
995
1036
|
|
|
996
1037
|
```bash
|
|
@@ -1413,6 +1454,7 @@ twp workflow approval pending [--count]
|
|
|
1413
1454
|
```bash
|
|
1414
1455
|
twp workflow instance create --workflow <ワークフロー> --generate-cli-skeleton --output json > in.json
|
|
1415
1456
|
twp workflow instance create --workflow <ワークフロー> --content-file in.json # 下書き
|
|
1457
|
+
twp workflow instance create --workflow <ワークフロー> --dry-run # 承認経路の確認(作らない)
|
|
1416
1458
|
twp workflow instance apply <申請ID> # 提出
|
|
1417
1459
|
twp workflow instance update <申請ID> --content-file in.json
|
|
1418
1460
|
twp workflow instance delete <申請ID> --yes
|
|
@@ -1423,6 +1465,7 @@ twp workflow approval cancel <申請ID> [--comment-file <パス>] --yes
|
|
|
1423
1465
|
```
|
|
1424
1466
|
|
|
1425
1467
|
- 申請は「下書きを作る(`create`)→ 提出する(`apply`)」の2段です。`create` だけでは承認者へ届きません
|
|
1468
|
+
- `create --dry-run` は申請を作らず、承認の段と各段のいまの該当承認者を出します(ワークフロー設定画面の「現在の該当承認者」と同じ判定)。「申請者の上長」など申請時に決まる条件は人数に入りません。該当者0名で提出が断られる段は警告になります。**承認者の条件を読めるのはワークフローの管理者だけ**で、管理者でなければ段の名前だけを出し、承認者は表示できないと言います(提出後の進み具合は `instance get <申請ID>` で見られます)
|
|
1426
1469
|
- `--content-file` は `title` / `description` / `form_data` を持つ JSON です。`--generate-cli-skeleton` が申請書の入力項目から雛形を出し、項目の表示名・型・必須・選択肢は stderr に出ます。それ以外のキーは送る前にエラーになります
|
|
1427
1470
|
- `update` の `form_data` は丸ごと置き換わります(今の値は `instance get <申請ID> --output json` で取れます)
|
|
1428
1471
|
- `reject` / `send-back` はコメント(理由)が必須です。`cancel` は申請者本人が承認待ちの申請を取り下げる操作です
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{SCHEDULE_HELP,parseSchedule}from"./chunk-
|
|
3
|
+
import{SCHEDULE_HELP,parseSchedule}from"./chunk-EQTXWU2Y.js";import"./chunk-WVCEKC7V.js";import"./chunk-RX5HWI4L.js";import{charCount,readBody}from"./chunk-M763HXDH.js";import"./chunk-W4NLJ2YK.js";import{AGENT_REPOSITORIES_PATH,AGENT_SCHEDULES_PATH,AGENT_SESSIONS_PATH}from"./chunk-M36DAHMH.js";import{isSafePathSegment}from"./chunk-HVZUXLQ4.js";import{ApiError}from"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";import"./chunk-IXT2X5BZ.js";
|
|
4
4
|
import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-MI6HVYR2.js";import"./chunk-II5RVJQN.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiRejectedError,ApiResponseError,NetworkError,UsageError,WaitTimeoutError}from"./chunk-VFPY2A23.js";import{NotLoggedInError,SessionExpiredError}from"./chunk-XNLIEUAW.js";import"./chunk-J7QYPKVK.js";import"./chunk-EDF4U5BT.js";
|
|
5
5
|
import"./chunk-RZVI6PMW.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";var LABEL="\u5B9A\u671F\u5B9F\u884C";var LIST_COLUMNS=["schedule_id","name","enabled","schedule","repository_full_name","next_run_at","last_run_at","disabled_reason","owner_user_id"];var GET_COLUMNS=["schedule_id","name","enabled","schedule","repository_full_name","base_branch","ai_provider","ai_model","next_run_at","last_run_at","last_session_id","consecutive_failures","disabled_reason","owner_user_id","can_edit","can_disable","created_at","updated_at"];var RUN_COLUMNS=["run_id","created_at","t\
|
|
6
6
|
rigger","result","skip_reason","session_id","pr_url","error_message"];var NAME_MAX_CHARS=100;var INSTRUCTION_MAX_CHARS=1e4;var RUNS_MAX_LIMIT=100;var FORBIDDEN="AI\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u6A5F\u80FD\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\uFF08agent\uFF09\u304C\u3042\u306A\u305F\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u3066\u3044\u306A\u3044\u304B\u3001\u4ED6\u30E6\u30FC\u30B6\u30FC\u306E\u5B9A\u671F\u5B9F\u884C\u3092\u5909\u66F4\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307E\u3059\u3002\u7DE8\u96C6\u30FB\u524A\u9664\u30FB\u6709\u52B9\u5316\u30FB\u4ECA\u3059\u3050\u5B9F\u884C\u306F\u30AA\u30FC\u30CA\u30FC\u672C\u4EBA\u3060\u3051\u3001\u7121\u52B9\u5316\u306F\u30AA\u30FC\u30CA\u30FC\u3068\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u7BA1\u7406\u8005\u304C\u3067\u304D\u307E\u3059\u3002";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{DEPARTMENT_FLAG,FROM_FLAG,MANHOUR_DESCRIPTION,MANHOUR_FROM_FLAG,MANHOUR_TO_FLAG,MONTH_FLAG,TO_FLAG,USER_FLAG,analysisDomain,analysisForbidden,currentMonth,dataOf,levelGuidance,listIn,manhourNotes,manhourQuery,manhourRows,monthColumns,monthRange,monthsBetween,noArgs,periodNote,profitRows,rangeNotes,recordOf,resolveFilters,resolvedOrUndefined,responseMonths,staffKpiRows,workloadDistributionNotes,workloadDistributionRows}from"./chunk-
|
|
4
|
-
import"./chunk-EXT4AIDF.js";import"./chunk-
|
|
3
|
+
import{DEPARTMENT_FLAG,FROM_FLAG,MANHOUR_DESCRIPTION,MANHOUR_FROM_FLAG,MANHOUR_TO_FLAG,MONTH_FLAG,TO_FLAG,USER_FLAG,analysisDomain,analysisForbidden,currentMonth,dataOf,levelGuidance,listIn,manhourNotes,manhourQuery,manhourRows,monthColumns,monthRange,monthsBetween,noArgs,periodNote,profitRows,rangeNotes,recordOf,resolveFilters,resolvedOrUndefined,responseMonths,staffKpiRows,workloadDistributionNotes,workloadDistributionRows}from"./chunk-U6KPYJTM.js";import"./chunk-23MEOBJF.js";import"./chunk-UVCJXHWN.js";
|
|
4
|
+
import"./chunk-EXT4AIDF.js";import"./chunk-MPGJU5A7.js";import"./chunk-RX5HWI4L.js";import"./chunk-JJSBBWJ5.js";import"./chunk-M763HXDH.js";import"./chunk-W4NLJ2YK.js";import"./chunk-M36DAHMH.js";import"./chunk-HVZUXLQ4.js";import"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";import"./chunk-IXT2X5BZ.js";import"./chunk-MI6HVYR2.js";import"./chunk-II5RVJQN.js";import"./chunk-PS5QFKHB.js";import"./chunk-3ZRMMBP5.js";
|
|
5
5
|
import"./chunk-VFPY2A23.js";import"./chunk-J7QYPKVK.js";import"./chunk-EDF4U5BT.js";import"./chunk-RZVI6PMW.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";export{DEPARTMENT_FLAG,FROM_FLAG,MANHOUR_DESCRIPTION,MANHOUR_FROM_FLAG,MANHOUR_TO_FLAG,MONTH_FLAG,TO_FLAG,USER_FLAG,analysisDomain,analysisForbidden,currentMonth,dataOf,levelGuidance,listIn,manhourNotes,manhourQuery,manhourRows,monthColumns,monthRange,monthsBetween,noArgs,periodNote,profitRows,rangeNotes,recordOf,resolveFilters,resolvedOrUndefined,responseMonths,staffKpiRows,workloadDistributionNotes,workloadDistributionRows};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{composeDocument,htmlToText,metaLine}from"./chunk-
|
|
3
|
+
import{composeDocument,htmlToText,metaLine}from"./chunk-62GRAKUD.js";import{boundedText}from"./chunk-JJSBBWJ5.js";import{readBody}from"./chunk-M763HXDH.js";import"./chunk-W4NLJ2YK.js";import{ANNOUNCEMENTS_PATH}from"./chunk-M36DAHMH.js";import{isSafePathSegment}from"./chunk-HVZUXLQ4.js";import"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";import"./chunk-IXT2X5BZ.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,positiveInteger}from"./chunk-MI6HVYR2.js";
|
|
4
4
|
import"./chunk-II5RVJQN.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";import"./chunk-J7QYPKVK.js";import"./chunk-EDF4U5BT.js";import"./chunk-RZVI6PMW.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";var LABEL="\u304A\u77E5\u3089\u305B";var LIST_COLUMNS=["id","publish_start_at","sender_name","category_name","title","is_read","require_confirmation","is_confirmed"];var UNCONFIRMED_COLUMNS=["id","publish_start_at","publish_end_at","importance","title"];var GET_COLUMNS=["id","title","sender_name","category_name","importance_name","publish_start_at","publish_end_at","is_organization","is_read","require_confirmation","is_confirmed","allow_replies","link_url"];var REPLY_COLUMNS=["id","created_at","\
|
|
5
5
|
user_name","is_mine","content"];var REPLY_MAX_CHARS=2e3;function noArgs(input,op){if(input.args.length>0){throw new UsageError(`${op} \u306F\u4F4D\u7F6E\u5F15\u6570\u3092\u53D6\u308A\u307E\u305B\u3093: ${input.args.join(" ")}`,`twp announcement ${op} help`)}}function checkId(raw,help){const id=raw.trim();if(id==="")throw new UsageError("\u304A\u77E5\u3089\u305B\u306E ID \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044",help);if(!isSafePathSegment(id)){throw new UsageError(`\u304A\u77E5\u3089\u305B\u306E ID \u3068\u3057\u3066\u4F7F\u3048\u306A\u3044\
|
|
6
6
|
\u5024\u3067\u3059: ${id}`,"\u304A\u77E5\u3089\u305B\u306E ID \u306F twp announcement list \u306E id \u5217\u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002")}return id}function announcementId(input,op){const help=`twp announcement ${op} help`;const[raw,...rest]=input.args;if(rest.length>0)throw new UsageError(`${op} \u304C\u53D7\u3051\u53D6\u308C\u308B\u304A\u77E5\u3089\u305B ID \u306F1\u3064\u3060\u3051\u3067\u3059: ${rest.join(" ")}`,help);return checkId(raw??"",help)}function announcementIds(input){
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{CommandModelMissingError,MAX_REPORTED_VIOLATIONS,loadCommandModelDomain,loadCommandModelRoutes,validateBody,validateQuery}from"./chunk-NZ7WI4RZ.js";import{exitCodeFor,fetchAllPages,reportError}from"./chunk-
|
|
4
|
-
import{parseOperationArgs,repeatedValues}from"./chunk-RX5HWI4L.js";import{readBody}from"./chunk-
|
|
3
|
+
import{CommandModelMissingError,MAX_REPORTED_VIOLATIONS,loadCommandModelDomain,loadCommandModelRoutes,validateBody,validateQuery}from"./chunk-NZ7WI4RZ.js";import{exitCodeFor,fetchAllPages,reportError}from"./chunk-ZTDDOUS4.js";import"./chunk-Y5XM6W3S.js";import{evaluateQuery}from"./chunk-GFLGXGWE.js";import{renderOutput}from"./chunk-SZOEBJGI.js";import"./chunk-Q3B65OFC.js";import{describeWaitResult,parseWaitOptions,waitUntilTerminal}from"./chunk-WVCEKC7V.js";
|
|
4
|
+
import{parseOperationArgs,repeatedValues}from"./chunk-RX5HWI4L.js";import{readBody}from"./chunk-M763HXDH.js";import{ALLOW_REDACTED_FLAG,NO_REDACT_FLAG,NO_REDACT_NOTICE}from"./chunk-W4NLJ2YK.js";import"./chunk-M36DAHMH.js";import"./chunk-HVZUXLQ4.js";import{ApiError,TwpApiClient,appendQuery}from"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";import{redactSecretValues,redactSecrets,withDebug}from"./chunk-IXT2X5BZ.js";import{DEFAULT_MAX_ITEMS,DEFAULT_MAX_PAGES,
|
|
5
5
|
envelopePaging,isPageNumberEnvelope,pageRangeNotes,positiveInteger,readEnvelopeCursor,readPageNumberCursor,shellQuote}from"./chunk-MI6HVYR2.js";import"./chunk-II5RVJQN.js";import"./chunk-3ZRMMBP5.js";import{ApiResponseError,EXIT_OK,EXIT_WAIT_TIMEOUT,NetworkError,UsageError}from"./chunk-VFPY2A23.js";import{GLOBAL_OPTIONS_HELP}from"./chunk-PECIBNFD.js";import{AuthSession,NotLoggedInError,SessionExpiredError,loadCredentials}from"./chunk-XNLIEUAW.js";import{httpFetch}from"./chunk-J7QYPKVK.js";
|
|
6
|
-
import{effectiveApiUrl,resolveConfiguredOutput,resolveProfile}from"./chunk-EDF4U5BT.js";import"./chunk-RZVI6PMW.js";import{HELP_TOKEN}from"./chunk-
|
|
6
|
+
import{effectiveApiUrl,resolveConfiguredOutput,resolveProfile}from"./chunk-EDF4U5BT.js";import"./chunk-RZVI6PMW.js";import{HELP_TOKEN}from"./chunk-C6U2CGX7.js";import"./chunk-QQRJLH6B.js";import{OUTPUT_FORMATS,resolveOutputFormat}from"./chunk-74BPZOKU.js";import"./chunk-UREA4ZIG.js";import{stripTerminalControls}from"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";var MIN_SEGMENT_CHARS=3;var parsedCache=new WeakMap;function splitSegments(path){return path.split("/").filter(segment=>segment!=="")}function parseRoutes(routes){const cached=parsedCache.get(routes);if(cached!==void 0)return cached;const parsed=[];for(const[key,domain]of Object.entries(routes.routes)){const space=key.indexOf(" ");if(space<=0)continue;const template=key.slice(space+1);parsed.push({method:key.slice(0,space),template,domain,segments:splitSegments(template).map(segment=>/^\{[^/{}]+\}$/.
|
|
7
7
|
test(segment)?null:segment)})}parsedCache.set(routes,parsed);return parsed}function matches(route,segments){if(route.segments.length!==segments.length)return false;return route.segments.every((literal,i)=>literal===null||literal===segments[i])}function compareSpecificity(a,b){const literals=route=>route.segments.filter(segment=>segment!==null).length;const diff=literals(b)-literals(a);if(diff!==0)return diff;for(let i=0;i<a.segments.length;i+=1){const aLiteral=a.segments[i]!==null;const bLiteral=b.
|
|
8
8
|
segments[i]!==null;if(aLiteral!==bLiteral)return aLiteral?-1:1}return 0}function lookupRoute(routes,method,path){const segments=splitSegments(path);const hits=parseRoutes(routes).filter(route=>matches(route,segments));const sameMethod=hits.filter(route=>route.method===method).sort(compareSpecificity);const best=sameMethod[0];if(best!==void 0)return{kind:"matched",domain:best.domain,template:best.template};if(hits.length>0){const[top]=[...hits].sort(compareSpecificity);const template=top.template;
|
|
9
9
|
const methods=[...new Set(hits.filter(route=>route.template===template).map(route=>route.method))].sort();return{kind:"method-mismatch",template,methods}}return{kind:"unknown"}}function pickOperation(operations,method,template){return operations.find(op=>op.method===method&&op.path===template)??null}async function suggestRoutes(routes,path,limit=5){const{default:fuzzysort}=await import("./fuzzysort-DFVKV4B4.js");const parsed=parseRoutes(routes);const templates=[...new Set(parsed.map(route=>route.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
3
|
import{RESIDENT_TOKEN_CAP,activateModeFiles,activatePermissionSettings,buildResidentSet,buildSystemPrompt,createAuditLogger,createTwpToolkit,currentBranch,describeAuditLog,describeToolCatalog,displayCwd,executeTool,findProjectTwpSubdir,localTools,lstatOrNull,parseFrontMatter,parseRule,persistProjectAllow,projectPermissionsPath,projectRootFor,readFileTool,residentInputs,resolveGitExecutable,runTurn,secretReason}from"./chunk-4DUZIRGL.js";import"./chunk-NZ7WI4RZ.js";import{buildDiffLines,
|
|
4
|
-
diffStat}from"./chunk-VRBI2NPI.js";import{require_fuzzysort}from"./chunk-DIMZRTLE.js";import"./chunk-N2UVRM3Z.js";import"./chunk-
|
|
5
|
-
import"./chunk-D233KKXW.js";import"./chunk-PMOUHEJQ.js";import"./chunk-XNLIEUAW.js";import{proxyDiagnostics}from"./chunk-J7QYPKVK.js";import{checkMinSupportedVersion,isBelowMinSupported,minSupportedBlockMessage}from"./chunk-DXXFUNYN.js";import"./chunk-EDF4U5BT.js";import{configReadDirs,twpHomeDir}from"./chunk-RZVI6PMW.js";import{parseArgv}from"./chunk-
|
|
6
|
-
nextMode}from"./chunk-2LOT54OO.js";import"./chunk-
|
|
4
|
+
diffStat}from"./chunk-VRBI2NPI.js";import{require_fuzzysort}from"./chunk-DIMZRTLE.js";import"./chunk-N2UVRM3Z.js";import"./chunk-M36DAHMH.js";import"./chunk-HVZUXLQ4.js";import"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";import"./chunk-IXT2X5BZ.js";import"./chunk-II5RVJQN.js";import"./chunk-VFPY2A23.js";import{RelayError,builtinCatalog,classifyModelSwitch,createRuntime,loadCachedCatalog,modelLabel,pickModel,specFor,toModelInfos}from"./chunk-LLBLGHHZ.js";
|
|
5
|
+
import"./chunk-D233KKXW.js";import"./chunk-PMOUHEJQ.js";import"./chunk-XNLIEUAW.js";import{proxyDiagnostics}from"./chunk-J7QYPKVK.js";import{checkMinSupportedVersion,isBelowMinSupported,minSupportedBlockMessage}from"./chunk-DXXFUNYN.js";import"./chunk-EDF4U5BT.js";import{configReadDirs,twpHomeDir}from"./chunk-RZVI6PMW.js";import{parseArgv}from"./chunk-IWY2SNST.js";import{applyPermissionMode,checkPermission,describePermissionMode,getMode,isModeId,modeSource,
|
|
6
|
+
nextMode}from"./chunk-2LOT54OO.js";import"./chunk-C6U2CGX7.js";import"./chunk-EOXTDZTA.js";import"./chunk-QQRJLH6B.js";import{isFullWidth,isWide,stringWidth,stripAnsi}from"./chunk-UREA4ZIG.js";import{stripTerminalControls}from"./chunk-NHYMHCAT.js";import{__commonJS,__export,__require,__toESM}from"./chunk-VSJBJXZO.js";var require_react_production=__commonJS({"node_modules/react/cjs/react.production.js"(exports){"use strict";var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element");var REACT_PORTAL_TYPE=Symbol.for("react.portal");var REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");var REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode");var REACT_PROFILER_TYPE=Symbol.for("react.profiler");var REACT_CONSUMER_TYPE=Symbol.for("react.consumer");var REACT_CONTEXT_TYPE=Symbol.for("react.context");var REACT_FORWARD_REF_TYPE=Symbol.
|
|
7
7
|
for("react.forward_ref");var REACT_SUSPENSE_TYPE=Symbol.for("react.suspense");var REACT_MEMO_TYPE=Symbol.for("react.memo");var REACT_LAZY_TYPE=Symbol.for("react.lazy");var REACT_ACTIVITY_TYPE=Symbol.for("react.activity");var REACT_VIEW_TRANSITION_TYPE=Symbol.for("react.view_transition");var MAYBE_ITERATOR_SYMBOL=Symbol.iterator;function getIteratorFn(maybeIterable){if(null===maybeIterable||"object"!==typeof maybeIterable)return null;maybeIterable=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||
|
|
8
8
|
maybeIterable["@@iterator"];return"function"===typeof maybeIterable?maybeIterable:null}var ReactNoopUpdateQueue={isMounted:function(){return false},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};var assign=Object.assign;var emptyObject={};function Component(props,context,updater){this.props=props;this.context=context;this.refs=emptyObject;this.updater=updater||ReactNoopUpdateQueue}Component.prototype.isReactComponent={};Component.prototype.setState=
|
|
9
9
|
function(partialState,callback){if("object"!==typeof partialState&&"function"!==typeof partialState&&null!=partialState)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,partialState,callback,"setState")};Component.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this,callback,"forceUpdate")};function ComponentDummy(){}ComponentDummy.prototype=Component.prototype;function PureComponent2(props,context,updater){
|
|
@@ -1212,7 +1212,7 @@ cwd()){const listed=await gitListFiles(cwd2);const raw=listed??await walkFiles(c
|
|
|
1212
1212
|
1;const after=/^[^\s]*/.exec(text.slice(cursor))?.[0]??"";return{query,start,end:cursor+after.length}}var TWP_SLASH_ROUTES={"/tasks":{domain:"task",operation:"list"},"/task":{domain:"task",operation:"get"},"/projects":{domain:"project",operation:"list"}};function isTwpSlashCommand(name){return Object.hasOwn(TWP_SLASH_ROUTES,name)}async function runTwpSlashCommand(name,args,deps){const route=TWP_SLASH_ROUTES[name];if(!Object.hasOwn(TWP_SLASH_ROUTES,name)||route===void 0){return{code:2,out:"",err:`\u4E0D\u660E\u306A\u30B3\u30DE\u30F3\u30C9: ${name}
|
|
1213
1213
|
`}}const parsed=parseArgv([route.domain,route.operation,...args]);if(parsed.command!=="domain"||parsed.domain!==route.domain){return{code:2,out:"",err:`${name}: \u3053\u306E\u5F15\u6570\u306F\u4F7F\u3048\u307E\u305B\u3093\uFF08${args.join(" ")}\uFF09
|
|
1214
1214
|
`}}if(parsed.unknown.length>0){return{code:2,out:"",err:`\u4E0D\u660E\u306A\u5F15\u6570: ${parsed.unknown.join(" ")}
|
|
1215
|
-
`}}let out="";let err="";const io={out:text=>void(out+=text),err:text=>void(err+=text),isTty:true};const globals={profile:parsed.profile??deps.profile,...parsed.output!==void 0?{output:parsed.output}:{},...parsed.query!==void 0?{query:parsed.query}:{},dryRun:parsed.dryRun,debug:parsed.debug,yes:parsed.yes,refresh:parsed.refresh};const{runDomain}=await import("./run-
|
|
1215
|
+
`}}let out="";let err="";const io={out:text=>void(out+=text),err:text=>void(err+=text),isTty:true};const globals={profile:parsed.profile??deps.profile,...parsed.output!==void 0?{output:parsed.output}:{},...parsed.query!==void 0?{query:parsed.query}:{},dryRun:parsed.dryRun,debug:parsed.debug,yes:parsed.yes,refresh:parsed.refresh};const{runDomain}=await import("./run-3UJFGBQR.js");try{const code=await runDomain({domain:route.domain,...parsed.operation!==void 0?{operation:parsed.operation}:
|
|
1216
1216
|
{},argv:parsed.domainArgv,help:parsed.domainHelp,globals,version:deps.version,io,...deps.fetchImpl!==void 0?{fetchImpl:deps.fetchImpl}:{}});return{code,out,err}}catch(e){return{code:1,out,err:`${err}${e.message}
|
|
1217
1217
|
`}}}var GIT_LOG_OUTPUT=["9f3c1a2 feat(ui): \u4E00\u89A7\u306E\u30D5\u30A3\u30EB\u30BF\u3092 URL \u30AF\u30A8\u30EA\u3068\u540C\u671F\u3059\u308B","4b8e0d7 fix(ui): \u4EEE\u60F3\u30B9\u30AF\u30ED\u30FC\u30EB\u306E\u884C\u9AD8\u3055\u3092\u5B9F\u6E2C\u5024\u306B\u5408\u308F\u305B\u308B","c15a99e refactor(api): \u4E00\u89A7\u53D6\u5F97\u306E\u30DA\u30FC\u30B8\u30F3\u30B0\u51E6\u7406\u3092\u5171\u901A\u5316\u3059\u308B","2d70f4b test: \u4E00\u89A7\u30D5\u30A3\u30EB\u30BF\u306E\u56DE\u5E30\u30C6\u30B9\u30C8\u3092\u8FFD\u52A0\u3059\u308B",
|
|
1218
1218
|
"a6e2b38 fix(api): \u7A7A\u306E\u691C\u7D22\u6761\u4EF6\u3067\u5168\u4EF6\u8FD4\u3089\u306A\u3044\u3088\u3046\u306B\u3059\u308B","7c40d51 chore(deps): \u958B\u767A\u4F9D\u5B58\u3092\u6700\u65B0\u3078\u66F4\u65B0\u3059\u308B","e83b1c6 docs: \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u624B\u9806\u306B Node 22 \u306E\u524D\u63D0\u3092\u8FFD\u8A18\u3059\u308B","b91f7a4 fix(ui): \u30E2\u30FC\u30C0\u30EB\u306E\u91CD\u306A\u308A\u9806\u3092\u6307\u5B9A\u3059\u308B","5a2c8e0 perf(api): \u4E00\u89A7\u306E N+1 \u3092\u89E3\u6D88\u3059\u308B",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{PUNCH_TYPES,assertMonthOpen,attendanceDomain}from"./chunk-
|
|
3
|
+
import{PUNCH_TYPES,assertMonthOpen,attendanceDomain}from"./chunk-23MEOBJF.js";import"./chunk-UVCJXHWN.js";import{dateFlag,monthFlag}from"./chunk-EXT4AIDF.js";import"./chunk-MPGJU5A7.js";import"./chunk-RX5HWI4L.js";import"./chunk-JJSBBWJ5.js";import"./chunk-M763HXDH.js";import"./chunk-W4NLJ2YK.js";import"./chunk-M36DAHMH.js";import{isSafePathSegment}from"./chunk-HVZUXLQ4.js";import"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";
|
|
4
4
|
import"./chunk-IXT2X5BZ.js";import"./chunk-MI6HVYR2.js";import"./chunk-II5RVJQN.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiRejectedError,ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";import"./chunk-J7QYPKVK.js";import"./chunk-EDF4U5BT.js";import"./chunk-RZVI6PMW.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";var CREATE_USAGE="twp attendance record create --date <YYYY-MM-DD> --time <HH:MM> --type <clock-in|clock-out|break-start|break-end|switch> [--project <\u30B3\u30FC\u30C9|ID>] [--task <\u30BF\u30B9\u30AFID>] [--memo <\u30E1\u30E2>]";var UPDATE_USAGE="twp attendance record update <\u8A18\u9332ID> --memo <\u30E1\u30E2> [--month <YYYY-MM>]";var DELETE_USAGE="twp attendance record delete <\u8A18\u9332ID> --reason <\u7406\u7531> --yes [--month <YYYY-MM>]";var MOVE_USAGE="twp attendance record move <\u8A18\u9332\
|
|
5
5
|
ID> --project <\u30B3\u30FC\u30C9|ID> [--month <YYYY-MM>]";var TEXT_MAX=500;var UUID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;var TIME_PATTERN=/^(\d{2}):(\d{2})(?::(\d{2}))?$/;var CLOSED_REASON="\u30B5\u30FC\u30D0\u306F\u7DE0\u3081\u6E08\u307F\u306E\u6708\u3078\u306E\u4FEE\u6B63\u3092\u62D2\u5426\u305B\u305A\u7DE0\u3081\u306E\u96C6\u8A08\u3092\u6D17\u3044\u66FF\u3048\u308B\u306E\u3067\u3001CLI \u304C\u9001\u308B\u524D\u306B\u6B62\u3081\u3066\u3044\u307E\u3059\u3002";
|
|
6
6
|
var FORBIDDEN="\u81EA\u5206\u306E\u6253\u523B\u306E\u4FEE\u6B63\u306B\u306F\u6253\u523B\u4FEE\u6B63\u306E\u6A29\u9650\uFF08\u30E6\u30FC\u30B6\u30FC\u8A2D\u5B9A\u306E\u300C\u6253\u523B\u4FEE\u6B63\u300D\uFF09\u3068\u52E4\u6020\u306E\u5229\u7528\u6A29\u9650\u304C\u5FC5\u8981\u3067\u3059\u3002\u30C6\u30CA\u30F3\u30C8\u306E\u7BA1\u7406\u8005\u306B\u4ED8\u4E0E\u3092\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044";var RECORD_COLUMNS=["id","type","type_label","recorded_at","year_month","project_id","t\
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{hoursMinutes}from"./chunk-
|
|
3
|
+
import{hoursMinutes}from"./chunk-23MEOBJF.js";import"./chunk-UVCJXHWN.js";import{monthFlag}from"./chunk-EXT4AIDF.js";import"./chunk-MPGJU5A7.js";import"./chunk-RX5HWI4L.js";import"./chunk-JJSBBWJ5.js";import"./chunk-M763HXDH.js";import"./chunk-W4NLJ2YK.js";import"./chunk-M36DAHMH.js";import"./chunk-HVZUXLQ4.js";import"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";import"./chunk-IXT2X5BZ.js";import"./chunk-MI6HVYR2.js";
|
|
4
4
|
import"./chunk-II5RVJQN.js";import"./chunk-PS5QFKHB.js";import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";import"./chunk-J7QYPKVK.js";import"./chunk-EDF4U5BT.js";import"./chunk-RZVI6PMW.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";var MONTH_FLAG={name:"--month",summary:"\u5BFE\u8C61\u306E\u5E74\u6708\uFF08YYYY-MM\uFF09",takesValue:true,placeholder:"<YYYY-MM>"};var ME_FLAG={name:"--me",summary:"\u81EA\u5206\u306E\u5206\u3060\u3051\u3092\u8868\u793A\u3059\u308B\uFF08\u7121\u3051\u308C\u3070\u5168\u54E1\u5206\u30FB\u7BA1\u7406\u8005\uFF09",takesValue:false};var FORBIDDEN_ADMIN="\u6A29\u9650\u304C\u8DB3\u308A\u307E\u305B\u3093\u3002\u5168\u54E1\u5206\uFF08--me \u306A\u3057\uFF09\u306F\u52E4\u6020\u306E\u7BA1\u7406\u8005\u6A29\u9650\uFF08\u52E4\u6020: \u7BA1\u7406\u8005\uFF09\u3001\u81EA\u5206\u306E\u5206\uFF08--me\uFF09\u306F\u52E4\u6020\u306E\u5229\u7528\u6A29\u9650\u304C\u8981\u308A\u307E\u3059\u3002\u30C6\u30CA\u30F3\u30C8\u306E\u7BA1\u7406\u8005\u306B\u6A29\u9650\u306E\u4ED8\u4E0E\u3092\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044";
|
|
5
5
|
function listBody(spec,body){if(!isRecord(body)||!Array.isArray(body[spec.key])){throw new ApiResponseError(`${spec.label}\u306E\u5FDC\u7B54\u306B ${spec.key} \u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`)}return body}function monthListOperation(spec){const usage=`twp ${spec.domain} list [--month <YYYY-MM>] [--me]`;return{name:"list",summary:`\u6708\u306E${spec.label}\u3092\u4E00\u89A7\u3059\u308B\uFF08--me \u3067\u81EA\u5206\u306E\u5206\u30FB\u7121\u3051\u308C\u3070\u5168\u54E1\u5206\uFF1D\u7BA1\u7406\u8005\uFF09`,
|
|
6
6
|
usage,description:`GET ${spec.path} \u3092\u8868\u793A\u3057\u307E\u3059\uFF08\u5168\u54E1\u5206\u30FB\u52E4\u6020\u306E\u7BA1\u7406\u8005\u6A29\u9650\u304C\u5FC5\u8981\uFF09\u3002--me \u3092\u4ED8\u3051\u308B\u3068 GET ${spec.path}/me\uFF08\u81EA\u5206\u306E\u5206\uFF09\u3067\u3059\u3002
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{repeatedValues}from"./chunk-RX5HWI4L.js";import{readBody}from"./chunk-
|
|
3
|
+
import{repeatedValues}from"./chunk-RX5HWI4L.js";import{readBody}from"./chunk-M763HXDH.js";import"./chunk-W4NLJ2YK.js";import{BACKLOG_BASE_PATH,BACKLOG_PROJECT_SCOPE_LABEL,BACKLOG_SCOPE_LABEL,backlogSpacePath,isExactNumericId,resolveNamed}from"./chunk-M36DAHMH.js";import"./chunk-HVZUXLQ4.js";import"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";import"./chunk-IXT2X5BZ.js";import{LIST_FLAGS}from"./chunk-MI6HVYR2.js";import"./chunk-II5RVJQN.js";
|
|
4
4
|
import{requireResolved,singleRef,withResolved}from"./chunk-PS5QFKHB.js";import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";import"./chunk-J7QYPKVK.js";import"./chunk-EDF4U5BT.js";import"./chunk-RZVI6PMW.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";var DEFAULT_COUNT=20;var MAX_COUNT=100;var NUMERIC=/^[0-9]+$/;var ISSUE_REF=/^(?:[A-Za-z0-9_]+-[0-9]+|[0-9]+)$/;var DATE=/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;var SPACE_COLUMNS=["id","space_url"];var PROJECT_COLUMNS=["id","projectKey","name"];var ISSUE_LIST_COLUMNS=["issueKey","summary","status","assignee","priority","dueDate","updated","descriptionTruncated"];var ISSUE_GET_COLUMNS=["id","issueKey","projectId","summary","description","descriptionTruncated","status","issueType","priority","assignee","cr\
|
|
5
5
|
eatedUser","parentIssueId","startDate","dueDate","estimatedHours","actualHours","created","updated"];var ISSUE_JSON_SHAPE_HELP='--output json \u306E\u5F62\uFF08Backlog API \u306E\u5F62\u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF09:\n TWP \u30B5\u30FC\u30D0\u304C\u6574\u3048\u305F\u5F62\u3067\u8FD4\u308A\u307E\u3059\u3002Backlog API \u306E\u8AB2\u984C\u3092\u305D\u306E\u307E\u307E\u8AAD\u3080\u524D\u63D0\u3067\u66F8\u304F\u3068\u58CA\u308C\u307E\u3059\u3002\n - status / priority / resolution / issueType / assignee / createdUser / updatedUser \u306F\n \u540D\u524D\u306E\u6587\u5B57\u5217\u3067\u3059\uFF08{id, name} \u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF09\u3002ID \u306F statusId / issueTypeId /\n assigneeId \u2026 \u306E\u3088\u3046\u306B\u672B\u5C3E Id \u306E\u5225\u30AD\u30FC\u306B\u3042\u308A\u307E\u3059\u3002\u672A\u8A2D\u5B9A\u306A\u3089\u4E21\u65B9 null \u3067\u3059\u3002\n - category / versions / milestone \u306F {id, name} \u306E\u914D\u5217\u306E\u307E\u307E\u3067\u3059\uFF08\u8907\u6570\u4ED8\u3051\u3089\u308C\u308B\u305F\u3081\u3001\n \
|
|
6
6
|
\u540D\u524D\u3068 ID \u3092\u5225\u30AD\u30FC\u3078\u5206\u3051\u308B\u3068\u5BFE\u5FDC\u304C\u5D29\u308C\u307E\u3059\uFF09\u3002customFields \u3082\u914D\u5217\u3067\u3059\u3002\n \u4F8B\uFF081\u4EF6\u30FB\u629C\u7C8B\uFF09:\n {"id": 1234, "issueKey": "PRJ-12", "summary": "\u2026",\n "statusId": 1, "status": "\u672A\u5BFE\u5FDC", "issueTypeId": 56, "issueType": "\u30BF\u30B9\u30AF",\n "assigneeId": 91, "assignee": "\u8C37 \u6A39",\n "category": [{"id": 7, "name": "\u8A2D\u8A08"}], "milestone": [], ...}\n --query \u3082\u3053\u306E\u5F62\u306B\u5F53\u305F\u308A\u307E\u3059\uFF08issue list \u306E\u4F8B: --query "[].{key: issueKey, type: issueType}"\uFF09\u3002';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{breakdownRows,budgetDomain,dashboardRows,fiscalYear,importRejection,overwriteLines,parseAllocationRows,parseSplit,parseTargetRows,periodsLabel}from"./chunk-
|
|
3
|
+
import{breakdownRows,budgetDomain,dashboardRows,fiscalYear,importRejection,overwriteLines,parseAllocationRows,parseSplit,parseTargetRows,periodsLabel}from"./chunk-EGOE26U7.js";import"./chunk-U6KPYJTM.js";import"./chunk-23MEOBJF.js";import"./chunk-UVCJXHWN.js";import"./chunk-EXT4AIDF.js";import"./chunk-MPGJU5A7.js";import"./chunk-RX5HWI4L.js";import"./chunk-JJSBBWJ5.js";import"./chunk-M763HXDH.js";import"./chunk-W4NLJ2YK.js";import"./chunk-M36DAHMH.js";
|
|
4
4
|
import"./chunk-HVZUXLQ4.js";import"./chunk-JA5A6UJ2.js";import"./chunk-MMVXE2CJ.js";import"./chunk-IXT2X5BZ.js";import"./chunk-MI6HVYR2.js";import"./chunk-II5RVJQN.js";import"./chunk-PS5QFKHB.js";import"./chunk-3ZRMMBP5.js";import"./chunk-VFPY2A23.js";import"./chunk-J7QYPKVK.js";import"./chunk-EDF4U5BT.js";import"./chunk-RZVI6PMW.js";import"./chunk-QQRJLH6B.js";import"./chunk-NHYMHCAT.js";import"./chunk-VSJBJXZO.js";export{breakdownRows,budgetDomain,dashboardRows,fiscalYear,importRejection,overwriteLines,parseAllocationRows,parseSplit,parseTargetRows,periodsLabel};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{USER_REF_HELP}from"./chunk-UVCJXHWN.js";import{dateFlag,monthFlag}from"./chunk-EXT4AIDF.js";import{STATUS_VALUES,createFlags,fieldBody,hasAnyField,idSegment,masterItem,masterRows,targetId,truncationNotes,updateFlags}from"./chunk-
|
|
3
|
+
import{USER_REF_HELP}from"./chunk-UVCJXHWN.js";import{dateFlag,monthFlag}from"./chunk-EXT4AIDF.js";import{STATUS_VALUES,createFlags,fieldBody,hasAnyField,idSegment,masterItem,masterRows,targetId,truncationNotes,updateFlags}from"./chunk-MPGJU5A7.js";import{repeatedValues}from"./chunk-RX5HWI4L.js";import{readBody}from"./chunk-M763HXDH.js";import{ATTENDANCE_REPORTS_PATH,ATTENDANCE_REPORT_MASTER_LABELS,ATTENDANCE_REPORT_MASTER_PATHS,ORG_MASTER_LIMIT,resolveNamed}from"./chunk-M36DAHMH.js";
|
|
4
4
|
import{isSafePathSegment}from"./chunk-HVZUXLQ4.js";import{ApiError}from"./chunk-JA5A6UJ2.js";import{nonEmpty,positiveInteger}from"./chunk-MI6HVYR2.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";import{acknowledgement,isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiRejectedError,ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";var COMMAND="twp attendance";function label(kind){return ATTENDANCE_REPORT_MASTER_LABELS[kind]}function commonFields(name){return[{kind:"text",flag:"--code",key:"code",label:`${name}\u30B3\u30FC\u30C9`,maxChars:50,summary:`${name}\u30B3\u30FC\u30C9\uFF08\u30C6\u30CA\u30F3\u30C8\u5185\u3067\u4E00\u610F\uFF09`},{kind:"text",flag:"--name",key:"name",label:`${name}\u540D`,maxChars:255,summary:`${name}\u540D`}]}function tailFields(){return[{kind:"integer",flag:"--sort",key:"sort",label:"\u8868\u793A\u9806",
|
|
5
5
|
min:0,max:9999,summary:"\u8868\u793A\u9806\uFF080\u301C9999\u3002\u5C0F\u3055\u3044\u307B\u3069\u4E0A\uFF09"},{kind:"enum",flag:"--status",key:"status",values:STATUS_VALUES,summary:"\u72B6\u614B\uFF08active: \u6709\u52B9 / inactive: \u7121\u52B9\uFF1D\u52E4\u6020\u9023\u7D61\u306E\u9078\u629E\u80A2\u306B\u51FA\u306A\u3044\uFF09"},{kind:"boolean",flag:"--admin-only",key:"is_admin_only",summary:"\u7BA1\u7406\u8005\u3060\u3051\u304C\u9078\u3079\u308B\u304B\uFF08true / false\uFF09"},{kind:"text",flag:"\
|
|
6
6
|
--description",key:"description",label:"\u8AAC\u660E",maxChars:1e3,summary:"\u8AAC\u660E"}]}function parentFlag(parent,mode){const parentLabel=label(parent.kind);const summary=mode==="create"?`\u7D10\u3065\u3051\u308B${parentLabel}\uFF08\u540D\u524D\u30FB\u30B3\u30FC\u30C9\u30FBID\u3002\u8907\u6570\u306A\u3089\u7E70\u308A\u8FD4\u3059\u3002\u7701\u304F\u3068\u6709\u52B9\u306A${parentLabel}\u3059\u3079\u3066\u306B\u7D10\u3065\u304F\uFF09`:`\u7D10\u3065\u3051\u308B${parentLabel}\uFF08\u540D\u524D\u30FB\u30B3\u30FC\u30C9\u30FBID\u3002\u8907\u6570\u306A\u3089\u7E70\u308A\u8FD4\u3059\u3002\
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{featureLicenseGuidance}from"./chunk-
|
|
3
|
+
import{featureLicenseGuidance}from"./chunk-EQXJOEOK.js";import{isExactNumericId}from"./chunk-M36DAHMH.js";import{nonEmpty}from"./chunk-MI6HVYR2.js";import{UsageError}from"./chunk-VFPY2A23.js";var PDF_PATH="/api/v2/sales/pdf";var FEATURE_DENIED="\u3053\u306E\u6A5F\u80FD\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002";function salesFeatureDenied(body){return body?.error==="permission_denied"||body?.error==="forbidden"&&body.error_description===FEATURE_DENIED}function pdfForbidden(body){if(salesFeatureDenied(body))return featureLicenseGuidance("\u8CA9\u58F2\u7BA1\u7406");const reason=body?.error;if(typeof reason==="string"&&reason.endsWith(
|
|
4
4
|
"\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093")){return`${reason}\uFF08\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B\u7D10\u3065\u304F\u66F8\u985E\u306F\u305D\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30E1\u30F3\u30D0\u30FC\u3001\u7D10\u3065\u304B\u306A\u3044\u66F8\u985E\u306F\u4F5C\u6210\u8005\u30FB\u62C5\u5F53\u8005\u3068\u7BA1\u7406\u8005\u3060\u3051\u304C\u51FA\u529B\u3067\u304D\u307E\u3059\uFF09`}return void 0}var ESTIMATE={name:"estimate",label:"\u898B\u7A4D",noExample:"EST0000063",
|
|
5
5
|
defaultKind:"estimate",kinds:{estimate:{segment:"estimate",label:"\u898B\u7A4D\u66F8"},order:{segment:"order",label:"\u6CE8\u6587\u66F8"},"order-acceptance":{segment:"order-acceptance",label:"\u6CE8\u6587\u8ACB\u66F8"}}};var INVOICE={name:"invoice",label:"\u8ACB\u6C42",noExample:"INV0000170",defaultKind:"invoice",kinds:{invoice:{segment:"invoice",label:"\u8ACB\u6C42\u66F8"},delivery:{segment:"delivery",label:"\u7D0D\u54C1\u66F8"},inspection:{segment:"inspection",label:"\u691C\u53CE\u66F8"}}};var PURCHASE={
|
|
6
6
|
name:"purchase",label:"\u4ED5\u5165",defaultKind:"order",kinds:{order:{segment:"purchase-order",label:"\u6CE8\u6587\u66F8"},"order-acceptance":{segment:"purchase-order-acceptance",label:"\u6CE8\u6587\u8ACB\u66F8"}}};var OUT_FLAG={name:"--out",summary:"\u66F8\u304D\u51FA\u3057\u5148\u306E\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9\uFF08\u5FC5\u9808\uFF09",takesValue:true,placeholder:"<\u30D1\u30B9.pdf>"};var FORCE_FLAG={name:"--force",summary:"\u65E2\u5B58\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u4E0A\u66F8\u304D\u3059\u308B",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
|
+
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
+
var MAX_BLOCK_DEPTH=10;var NAMED_ENTITIES={nbsp:" ",lt:"<",gt:">",quot:'"',apos:"'",amp:"&"};function decodeEntities(text){return text.replace(/&(#x[0-9a-f]{1,8}|#\d{1,8}|[a-z]{1,8});/gi,(whole,ref)=>{if(ref.startsWith("#")){const code=ref[1]==="x"||ref[1]==="X"?Number.parseInt(ref.slice(2),16):Number.parseInt(ref.slice(1),10);return Number.isInteger(code)&&code>0&&code<=1114111?String.fromCodePoint(code):whole}return NAMED_ENTITIES[ref.toLowerCase()]??whole})}var HTML_TAG_NAMES=new Set(["a","ab\
|
|
4
|
+
br","article","aside","audio","b","blockquote","body","br","caption","cite","code","col","colgroup","dd","del","details","div","dl","dt","em","figcaption","figure","font","footer","h1","h2","h3","h4","h5","h6","head","header","hr","html","i","iframe","img","input","ins","kbd","label","li","main","mark","meta","nav","ol","p","pre","q","s","samp","script","section","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","tfoot","th","thead","title","tr","u","ul",
|
|
5
|
+
"var","video"]);var ATTRIBUTES=/^(?:\s+[a-z_:][-\w:.]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?$/i;function tokenizeHtml(html){const tokens=[];let text="";let i=0;let nextLt=html.indexOf("<");let nextGt=-2;while(nextLt!==-1){text+=html.slice(i,nextLt);if(nextGt===-2||nextGt!==-1&&nextGt<nextLt)nextGt=html.indexOf(">",nextLt);const following=html.indexOf("<",nextLt+1);if(nextGt===-1||following!==-1&&following<nextGt){text+="<";i=nextLt+1;nextLt=following;continue}const inner=html.slice(
|
|
6
|
+
nextLt+1,nextGt);const match=/^(\/?)([a-z][a-z0-9]*)(?=[\s/]|$)/i.exec(inner);if(match!==null&&HTML_TAG_NAMES.has((match[2]??"").toLowerCase())&&ATTRIBUTES.test(inner.slice(match[0].length))){if(text!=="")tokens.push({kind:"text",text});text="";const[head,slash,name]=match;tokens.push({kind:"tag",name:name.toLowerCase(),closing:slash==="/",attrs:inner.slice(head.length)})}else if(!inner.startsWith("!")){text+=`<${inner}>`}i=nextGt+1;nextLt=html.indexOf("<",i)}text+=html.slice(i);if(text!=="")tokens.
|
|
7
|
+
push({kind:"text",text});return tokens}function attr(attrs,name){const lower=attrs.toLowerCase();let at=lower.indexOf(`${name}=`);while(at>0&&!/\s/.test(lower[at-1]??""))at=lower.indexOf(`${name}=`,at+1);if(at===-1)return void 0;const quote=attrs[at+name.length+1];if(quote!=='"'&"e!=="'")return void 0;const from=at+name.length+2;const to=attrs.indexOf(quote,from);return to===-1?void 0:decodeEntities(attrs.slice(from,to))}function hasHtmlTag(text){return tokenizeHtml(text).some(token=>token.kind===
|
|
8
|
+
"tag")}var PARAGRAPH_TAGS=new Set(["p","div","table","section","article","hr"]);var DROP_CONTENT_TAGS=new Set(["script","style","head","title"]);function listMarker(attrs,frame){const checked=attr(attrs,"data-checked");const kind=checked==="true"?"checked":checked==="false"?"unchecked":attr(attrs,"data-list")??frame?.listType;if(kind==="checked")return"- [x] ";if(kind==="unchecked")return"- [ ] ";if(kind==="ordered"||kind===void 0&&frame?.ordered===true)return`${frame===void 0?1:frame.count}. `;
|
|
9
|
+
return"- "}function htmlToText(html){const out=[];const links=[];const lists=[];let dropUntil;let inPre=false;for(const token of tokenizeHtml(html)){if(dropUntil!==void 0){if(token.kind==="tag"&&token.closing&&token.name===dropUntil)dropUntil=void 0;continue}if(token.kind==="text"){const text=decodeEntities(token.text);out.push(inPre?text:text.replace(/[ \t\r\n\f]+/g," "));continue}const{name,closing,attrs}=token;if(DROP_CONTENT_TAGS.has(name)){if(!closing)dropUntil=name;continue}if(name==="pre"){
|
|
10
|
+
out.push(closing?`
|
|
11
|
+
${FENCE_END}
|
|
12
|
+
|
|
13
|
+
`:`
|
|
14
|
+
|
|
15
|
+
${FENCE_START}
|
|
16
|
+
`);inPre=!closing;continue}if(inPre)continue;if(/^h[1-6]$/.test(name)){out.push(closing?"\n\n":`
|
|
17
|
+
|
|
18
|
+
${"#".repeat(Number(name[1]))} `)}else if(name==="ul"||name==="ol"){if(closing)lists.pop();else lists.push({ordered:name==="ol",listType:attr(attrs,"data-list"),count:0});out.push("\n\n")}else if(name==="li"&&!closing){const frame=lists[lists.length-1];if(frame!==void 0)frame.count+=1;out.push(`
|
|
19
|
+
${" ".repeat(Math.max(0,lists.length-1))}${listMarker(attrs,frame)}`)}else if(name==="blockquote"){out.push(closing?"\n\n":"\n\n> ")}else if(name==="br"){out.push("\n")}else if(PARAGRAPH_TAGS.has(name)){out.push("\n\n")}else if(name==="tr"){out.push("\n")}else if((name==="td"||name==="th")&&closing){out.push(" | ")}else if(name==="img"&&!closing){const src=attr(attrs,"src");if(src!==void 0&&src!=="")out.push(``)}else if(name==="a"){if(!closing){links.push({href:attr(attrs,
|
|
20
|
+
"href")??"",at:out.length})}else{const link=links.pop();if(link!==void 0&&link.href!==""){const label=out.splice(link.at).join("").trim();out.push(label===""||label===link.href?link.href:`[${label}](${link.href})`)}}}}return tidy(out.join(""),{trimStart:true})}var FENCE_START="```";var FENCE_END="```";function fenceTracker(maxIndent){let open;return line=>{if(open!==void 0){const close=/^([ \t]*)(`{3,}|~{3,})[ \t]*$/.exec(line);if(close!==null&&(close[1]??"").length<=maxIndent&&close[2]?.[0]===open.
|
|
21
|
+
char&&(close[2]?.length??0)>=open.length){open=void 0;return{fenceLine:true,inFence:false}}return{fenceLine:false,inFence:true}}const start=/^([ \t]*)(`{3,}|~{3,})(.*)$/.exec(line);const marker=start?.[2]??"";if(start===null||(start[1]??"").length>maxIndent||marker[0]==="`"&&(start[3]??"").includes("`")){return{fenceLine:false,inFence:false}}open={char:marker[0]??"`",length:marker.length};return{fenceLine:true,inFence:true}}}function tidy(text,options={}){const kept=[];let blank=0;const fence=fenceTracker(
|
|
22
|
+
options.markdown===true?3:Number.POSITIVE_INFINITY);for(const raw of text.replace(/\r\n?/g,"\n").split("\n")){const{fenceLine,inFence}=fence(raw);if(fenceLine){kept.push(raw.trim());blank=0;continue}if(inFence){kept.push(raw);continue}const line=options.trimStart===true&&!/^ {2,}(?:- |\d+\. )/.test(raw)?raw.trim():raw.trimEnd();blank=line===""?blank+1:0;if(blank<2)kept.push(line)}return kept.join("\n").replace(/^\n+|\n+$/g,"")}function oneLine(text){return text.split("\n").map(part=>part.trim()).
|
|
23
|
+
filter(part=>part!=="").join(" ")}function isObject(value){return value!==null&&typeof value==="object"&&!Array.isArray(value)}function inlineText(content,depth){if(depth>MAX_BLOCK_DEPTH||!Array.isArray(content))return"";return content.map(inline=>{if(typeof inline==="string")return inline;if(!isObject(inline))return"";if(inline["type"]==="link"){const label=inlineText(inline["content"],depth+1);const href=typeof inline["href"]==="string"?inline["href"]:"";if(href==="")return label;return label===
|
|
24
|
+
""||label===href?href:`[${label}](${href})`}if(typeof inline["text"]==="string")return inline["text"];return inlineText(inline["content"],depth+1)}).join("")}function tableLines(content,depth){if(!isObject(content)||!Array.isArray(content["rows"]))return[];return content["rows"].flatMap(row=>{if(!isObject(row)||!Array.isArray(row["cells"]))return[];const cells=row["cells"].map(cell=>inlineText(isObject(cell)?cell["content"]:cell,depth+1).replace(/\|/g,"\\|").replace(/\n/g," "));return[`| ${cells.
|
|
25
|
+
join(" | ")} |`]})}function blockPrefix(block,ordinal){const props=isObject(block["props"])?block["props"]:{};switch(block["type"]){case"heading":{const level=typeof props["level"]==="number"&&props["level"]>=1&&props["level"]<=6?props["level"]:1;return`${"#".repeat(level)} `}case"bulletListItem":return"- ";case"numberedListItem":return`${ordinal}. `;case"checkListItem":return props["checked"]===true?"- [x] ":"- [ ] ";case"quote":return"> ";default:return""}}function mediaLine(block){const props=isObject(
|
|
26
|
+
block["props"])?block["props"]:{};const url=typeof props["url"]==="string"?props["url"]:"";if(url==="")return void 0;const name=[props["caption"],props["name"]].find(v=>typeof v==="string"&&v.trim()!=="")??"";const label=block["type"]==="image"?"\u753B\u50CF":"\u30D5\u30A1\u30A4\u30EB";return`${block["type"]==="image"?"!":""}[${name===""?label:name}](${url})`}function blocksToLines(blocks,depth){if(!Array.isArray(blocks)||depth>MAX_BLOCK_DEPTH)return[];const indent=" ".repeat(depth);const lines=[];
|
|
27
|
+
let ordinal=0;for(const block of blocks){if(!isObject(block))continue;ordinal=block["type"]==="numberedListItem"?ordinal+1:0;if(block["type"]==="table"){lines.push(...tableLines(block["content"],depth).map(row=>`${indent}${row}`))}else if(block["type"]==="codeBlock"){const code=inlineText(block["content"],depth);lines.push(`${indent}\`\`\``,...code.split("\n").map(row=>`${indent}${row}`),`${indent}\`\`\``)}else{const text=inlineText(block["content"],depth);const media=text.trim()===""?mediaLine(
|
|
28
|
+
block):void 0;if(media!==void 0){lines.push(`${indent}${media}`)}else if(text.trim()!==""){const prefix=blockPrefix(block,ordinal);const continuation=`${indent}${" ".repeat(prefix.length)}`;lines.push(`${indent}${prefix}${text.split("\n").join(`
|
|
29
|
+
${continuation}`)}`)}else{lines.push("")}}lines.push(...blocksToLines(block["children"],depth+1))}return lines}function blockNoteToText(blocks){return tidy(blocksToLines(blocks,0).join("\n"))}function meetingContentToText(content){if(typeof content!=="string")return"";const trimmed=content.trim();if(trimmed==="")return"";if(trimmed.startsWith("[")){try{const parsed=JSON.parse(trimmed);if(Array.isArray(parsed))return blockNoteToText(parsed)}catch{}}return hasHtmlTag(trimmed)?htmlToText(trimmed):trimmed}
|
|
30
|
+
function wikiContentToText(content,contentFormat){if(typeof content!=="string")return"";if(contentFormat==="markdown")return tidy(content,{markdown:true});const trimmed=content.trim();const blocks=trimmed.startsWith("[")?parseBlockArray(trimmed):void 0;if(blocks!==void 0)return blockNoteToText(blocks);return hasHtmlTag(trimmed)?htmlToText(trimmed):trimmed}function parseBlockArray(text){try{const parsed=JSON.parse(text);return Array.isArray(parsed)&&parsed.length>0&&parsed.every(block=>isObject(block)&&
|
|
31
|
+
typeof block["type"]==="string")?parsed:void 0}catch{return void 0}}function noteContentToText(content,contentType){if(typeof content!=="string")return"";return contentType==="markdown"?tidy(content,{markdown:true}):htmlToText(content)}function metaLine(label,value){if(value===null||value===void 0)return[];const text=Array.isArray(value)?value.filter(v=>typeof v==="string"||typeof v==="number").join(", "):typeof value==="string"||typeof value==="number"||typeof value==="boolean"?String(value):"";
|
|
32
|
+
return text.trim()===""?[]:[`${label}: ${oneLine(text)}`]}function composeDocument(title,meta,sections){const parts=[`# ${typeof title==="string"&&title.trim()!==""?oneLine(title):"(\u7121\u984C)"}`];if(meta.length>0)parts.push(meta.join("\n"));for(const section of sections){if(section.body.trim()==="")continue;parts.push(section.heading===void 0?section.body:`\u25A0 ${section.heading}
|
|
33
|
+
|
|
34
|
+
${section.body}`)}return`${parts.join("\n\n")}
|
|
35
|
+
`}var HEADING_LINE=/^ {0,3}(#{1,6})(?:[ \t]+(.*?))?(?:[ \t]+#+)?[ \t]*$/;var NESTED_HEADING_LINE=/^[ \t]*(#{1,6})(?:[ \t]+(.*?))?(?:[ \t]+#+)?[ \t]*$/;function headingLines(lines,options){const pattern=options.markdown===true?HEADING_LINE:NESTED_HEADING_LINE;const found=[];const fence=fenceTracker(options.markdown===true?3:Number.POSITIVE_INFINITY);lines.forEach((raw,line)=>{const{fenceLine,inFence}=fence(raw);if(fenceLine||inFence)return;const match=pattern.exec(raw);if(match!==null)found.push(
|
|
36
|
+
{level:match[1]?.length??1,title:match[2]?.trim()??"",line})});return found}function sectionEnd(headings,index,total){const own=headings[index];const next=headings.slice(index+1).find(h=>own!==void 0&&h.level<=own.level);return next?.line??total}function textOutline(text,options={}){const lines=text.split("\n");const headings=headingLines(lines,options);return headings.flatMap((h,index)=>h.title===""?[]:[{level:h.level,title:h.title,chars:[...lines.slice(h.line+1,sectionEnd(headings,index,lines.
|
|
37
|
+
length)).join("\n").trim()].length}])}function headingKey(title){return title.replace(/^#+\s*/,"").replace(/\s+/g," ").trim()}function textSection(text,query,options={}){const lines=text.split("\n");const headings=headingLines(lines,options);const key=headingKey(query);if(key==="")return void 0;let hits=headings.flatMap((h,index2)=>headingKey(h.title)===key?[index2]:[]);if(hits.length===0)hits=headings.flatMap((h,index2)=>headingKey(h.title).toLowerCase()===key.toLowerCase()?[index2]:[]);const index=hits[0];
|
|
38
|
+
const heading=index===void 0?void 0:headings[index];if(index===void 0||heading===void 0)return void 0;return{level:heading.level,title:heading.title,text:tidy(lines.slice(heading.line,sectionEnd(headings,index,lines.length)).join("\n"),{markdown:options.markdown===true}),matches:hits.length}}export{htmlToText,oneLine,meetingContentToText,wikiContentToText,noteContentToText,metaLine,composeDocument,textOutline,textSection};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{CONCURRENCY,DEFAULT_INACTIVE_DAYS,LOGIN_HISTORY_RETENTION_DAYS,daysBetween,lastLogin,lastLoginText,mapPool,pacedSender,primaryAssignment,recentlyHired,spreadsheetSafe,userDetail}from"./chunk-7PTFN3H7.js";import{DEPARTMENTS_PATH}from"./chunk-
|
|
3
|
+
import{CONCURRENCY,DEFAULT_INACTIVE_DAYS,LOGIN_HISTORY_RETENTION_DAYS,daysBetween,lastLogin,lastLoginText,mapPool,pacedSender,primaryAssignment,recentlyHired,spreadsheetSafe,userDetail}from"./chunk-7PTFN3H7.js";import{DEPARTMENTS_PATH}from"./chunk-M36DAHMH.js";import{ApiError}from"./chunk-JA5A6UJ2.js";import{positiveInteger,shellQuote}from"./chunk-MI6HVYR2.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";import{isRecord}from"./chunk-3ZRMMBP5.js";
|
|
4
4
|
import{ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";var SEAT_MOVING_LEVELS={inquiry:["admin","member"],content_management:["admin","member"],workflow:["admin"],hearing:["admin"]};function levelHoldsSeat(feature,level){return SEAT_MOVING_LEVELS[feature]?.includes(level)??false}function permissionMovesSeat(feature){return Object.hasOwn(SEAT_MOVING_LEVELS,feature)}var LICENSE_FEATURE_NAMES={content_management:"\u30B3\u30F3\u30C6\u30F3\u30C4\u7BA1\u7406",inquiry:"\u554F\u3044\u5408\u308F\u305B\u7BA1\u7406",workflow:"\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC",hearing:"\u30D2\u30A2\u30EA\u30F3\u30B0",task_management:"\u30BF\u30B9\u30AF\u7BA1\u7406",sales:"\u53D6\u5F15\u7BA1\u7406",attendance:"\u52E4\u6020\u7BA1\u7406",report:"\u30EC\u30DD\u30FC\u30C8",hr_management:"\u4EBA\u6750\u7BA1\u7406",learning:"\u5B66\u7FD2\u7BA1\u7406",expense:"\u7D4C\u8CBB\u7BA1\u7406",test:"\
|
|
5
5
|
\u30B7\u30CA\u30EA\u30AA\u30C6\u30B9\u30C8\u7BA1\u7406",chat:"\u30C1\u30E3\u30C3\u30C8",customer:"\u9867\u5BA2\u7BA1\u7406",survey:"\u30A2\u30F3\u30B1\u30FC\u30C8",organization_survey:"\u7D44\u7E54\u30B5\u30FC\u30D9\u30A4",feedback:"\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF",notes:"\u30CE\u30FC\u30C8",wiki_management:"Wiki",meeting_minutes:"\u8B70\u4E8B\u9332",equipment_management:"\u5099\u54C1\u7BA1\u7406",floor_map:"\u30D5\u30ED\u30A2\u30DE\u30C3\u30D7"};var LICENSES_PATH="/api/v2/licenses";var FORBIDDEN="\
|
|
6
6
|
\u7D44\u7E54\u7BA1\u7406\u8005\u306E\u6A29\u9650\u304C\u5FC5\u8981\u3067\u3059\u3002twp license \u306F\u30C6\u30CA\u30F3\u30C8\u306E\u7D44\u7E54\u7BA1\u7406\u8005\u3060\u3051\u304C\u4F7F\u3048\u307E\u3059";var LIST_USAGE="twp license list";var ASSIGNMENTS_USAGE="twp license assignments <\u6A5F\u80FD\u30B3\u30FC\u30C9|\u6A5F\u80FD\u540D> | --all-features [--inactive-days <\u65E5\u6570>]";var ASSIGNMENTS_HELP="twp license assignments help";var RELEASE_COMMAND_MISSING="release_command \u304C\u7A7A\u306E\u884C\u306F\u3001\u6A29\u9650\u3092 non\
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
|
+
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
+
var DOMAIN_NAMES=["agent","agent-loop","ai-review-reason","analysis","announcement","attendance","backlog","budget","business-hours","business-place","company","contract","customer","department","deposit","estimate","evaluation","expense","faq","fiscal-year","goal-sheet","holiday","inquiry","invoice","job-title","knowledge","leave","license","media","meeting","note","notification","onedrive","outlook","payee","position","project","prospect","purchase","qualification","receivable","redmine","repo\
|
|
4
|
+
rt","role-template","rounding-setting","seal-impression","search","segment","shift","skill","staffing-board","storage","supplier-payment","support","task","teams","user","user-contract-type","wiki","workchange","worker-agent","workflow"];function isDomainName(value){return value!==void 0&&DOMAIN_NAMES.includes(value)}var HELP_TOKEN="help";var API_TOKEN="api";export{DOMAIN_NAMES,isDomainName,HELP_TOKEN,API_TOKEN};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{analysisForbidden}from"./chunk-
|
|
3
|
+
import{analysisForbidden}from"./chunk-U6KPYJTM.js";import{repeatedValues}from"./chunk-RX5HWI4L.js";import{ApiError,MultipartBody}from"./chunk-JA5A6UJ2.js";import{nonEmpty}from"./chunk-MI6HVYR2.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiRejectedError,ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";import fs from"fs";import path from"path";var PATH="/api/v2/budget";var ANALYSIS_FORBIDDEN=analysisForbidden("");function budgetForbidden(body){if(body?.error==="forbidden")return"\u3053\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u95B2\u89A7\u3067\u304D\u307E\u305B\u3093\uFF08\u30E1\u30F3\u30D0\u30FC\u3067\u306A\u3044\u304B\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u6A29\u9650\u304C\u8DB3\u308A\u307E\u305B\u3093\uFF09\u3002\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u7BA1\u7406\u8005\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002";
|
|
4
4
|
return ANALYSIS_FORBIDDEN(body)}var FORBIDDEN=budgetForbidden;var EDIT_HINT="\u76EE\u6A19\u306E\u8A2D\u5B9A\u30FB\u30B3\u30D4\u30FC\u30FB\u53D6\u308A\u8FBC\u307F\u306F\u3001\u5168\u4F53\u7BA1\u7406\u8005\u304B\u5206\u6790\u306E\u6A29\u9650\u304C\u300C\u7BA1\u7406\u8005\u300D\u306E\u4EBA\u3060\u3051\u304C\u3067\u304D\u307E\u3059\u3002\u6309\u5206\u306F\u305D\u308C\u306B\u52A0\u3048\u3066\u3001\u305D\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u7BA1\u7406\u8005\u3082\u3067\u304D\u307E\u3059\n\uFF08\u3069\u3061\u3089\u3082\u5206\u6790\u306E\u6A29\u9650\u304C\u300C\u306A\u3057\u300D\u3067\u306F\u4F7F\u3048\u307E\u305B\u3093\uFF09\u3002";
|
|
5
5
|
var YEAR_MIN=2e3;var YEAR_MAX=2100;var IMPORT_MAX_BYTES=2048*1024;var SET_FILE_MAX_BYTES=4*1024*1024;var AMOUNT_MAX=999999999999;var SHOWN_OVERWRITES=24;var BOM=new RegExp(`^${String.fromCharCode(65279)}`);function usageOf(op){return`twp budget ${op} help`}function text(value){return typeof value==="string"||typeof value==="number"?String(value):""}function yen(value){return typeof value==="number"?`${value.toLocaleString("ja-JP")} \u5186`:"\uFF08\u306A\u3057\uFF09"}function noArgs(input,op){if(input.
|
|
6
6
|
args.length>0)throw new UsageError(`${op} \u306F\u4F4D\u7F6E\u5F15\u6570\u3092\u53D6\u308A\u307E\u305B\u3093: ${input.args.join(" ")}`,usageOf(op))}function envelope(body,what){if(!isRecord(body)||body["result"]!==true)throw new ApiResponseError(`${what}\u306E\u5FDC\u7B54\u306E\u5F62\u304C\u60F3\u5B9A\u3068\u9055\u3044\u307E\u3059\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`);return body}function dataRecord(body,what){const data=envelope(body,what)["data"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{parseWaitOptions,waitUntilTerminal}from"./chunk-WVCEKC7V.js";import{repeatedValues}from"./chunk-RX5HWI4L.js";import{charCount,readBody}from"./chunk-
|
|
3
|
+
import{parseWaitOptions,waitUntilTerminal}from"./chunk-WVCEKC7V.js";import{repeatedValues}from"./chunk-RX5HWI4L.js";import{charCount,readBody}from"./chunk-M763HXDH.js";import{WORKER_AGENTS_PATH}from"./chunk-M36DAHMH.js";import{isSafePathSegment}from"./chunk-HVZUXLQ4.js";import{ApiError}from"./chunk-JA5A6UJ2.js";import{LIST_FLAGS,LIST_PAGING_HELP,envelopePaging,nonEmpty,positiveInteger}from"./chunk-MI6HVYR2.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";
|
|
4
4
|
import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiRejectedError,ApiResponseError,UsageError,WaitTimeoutError}from"./chunk-VFPY2A23.js";import{NotLoggedInError,SessionExpiredError}from"./chunk-XNLIEUAW.js";var LABEL="\u30EF\u30FC\u30AB\u30FC\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8";var LIST_COLUMNS=["agent_id","name","is_enabled","schedule","next_run_at","last_run_status","last_run_at","owner_user_name"];var GET_COLUMNS=["agent_id","name","description","owner_user_name","is_enabled","schedule","next_run_at","is_running","last_run_status","last_run_at","last_run_id","allowed_tool_count","write_enabled","ai_model","consecutive_failure_count","auto_disabled_reason"];var TOOL_COLUMNS=["name","category","d\
|
|
5
5
|
isplay_name","is_mutating","is_available"];var TOOL_GET_COLUMNS=["name","category","display_name","description","is_mutating","is_destructive","is_available","required_feature","required_level","required_api_scopes"];var RUN_COLUMNS=["run_id","status","trigger","started_at","duration_ms","tool_call_count","consumed_credits","summary"];var RUN_GET_COLUMNS=["summary","status","skip_reason","error_code","error_message","run_id","agent_id","trigger","is_dry_run","started_at","finished_at","duration_\
|
|
6
6
|
ms","iteration_count","tool_call_count","mutation_count","consumed_credits","ai_model"];var STEP_COLUMNS=["step_no","type","tool_name","is_mutation","duration_ms","content","error_message"];var STEP_TYPES=["thinking","tool_call","tool_result","error","budget_warning","final_summary"];var FORBIDDEN="AI\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u6A5F\u80FD\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\uFF08agent\uFF09\u304C\u3042\u306A\u305F\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u4F7F\u3048\u307E\u305B\u3093\u3002\u30C6\u30CA\u30F3\u30C8\u306E\u7BA1\u7406\u8005\u306B\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u5272\u308A\u5F53\u3066\u3092\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044\u3002";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{repeatedValues}from"./chunk-RX5HWI4L.js";import{isoDate}from"./chunk-JJSBBWJ5.js";import{SALES_ESTIMATES_PATH,SALES_INVOICES_PATH,isExactNumericId,resolveNamed}from"./chunk-
|
|
3
|
+
import{repeatedValues}from"./chunk-RX5HWI4L.js";import{isoDate}from"./chunk-JJSBBWJ5.js";import{SALES_ESTIMATES_PATH,SALES_INVOICES_PATH,isExactNumericId,resolveNamed}from"./chunk-M36DAHMH.js";import{LIST_PAGING_HELP,PAGE_NUMBER_LIST_FLAGS,PAGE_NUMBER_PAGING_HELP,STABLE_PAGE_ORDER,nonEmpty,pageNumberPaging,pageNumberQuery,pageRangeNotes}from"./chunk-MI6HVYR2.js";import{withResolved}from"./chunk-PS5QFKHB.js";import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{
|
|
4
4
|
ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";var ESTIMATE_STATUSES={new:"\u4F5C\u6210\u4E2D",create_completed:"\u4F5C\u6210\u5B8C\u4E86",in_progress:"\u7533\u8ACB\u4E2D",approved:"\u627F\u8A8D\u6E08",submitted:"\u63D0\u793A\u6E08",rejected:"\u5DEE\u3057\u623B\u3057",deleted:"\u524A\u9664\u6E08"};var INVOICE_STATUSES={new:"\u4F5C\u6210\u4E2D",create_completed:"\u4F5C\u6210\u5B8C\u4E86",in_progress:"\u7533\u8ACB\u4E2D",approved:"\u627F\u8A8D\u6E08",rejected:"\u5DEE\u3057\u623B\u3057",submitted:"\u63D0\u793A\u6E08",manager_confirmation:"\u6848\u4EF6\u62C5\u5F53\u8005\
|
|
5
5
|
_\u6848\u4EF6\u5185\u5BB9\u30FB\u91D1\u984D\u78BA\u8A8D",invoice_issued:"\u8ACB\u6C42\u66F8\u767A\u884C\u6E08",sent_to_client:"\u5148\u65B9\u9001\u4ED8\u6E08",archived:"\u4FDD\u7BA1\u6E08",deleted:"\u524A\u9664\u6E08",cancelled:"\u53D6\u6D88\uFF08\u7121\u52B9\uFF09",lost:"\u5931\u6CE8"};var ALLOCATION_STATUSES={unallocated:"\u672A\u56DE\u53CE",allocated:"\u56DE\u53CE\u6E08"};function statusRefs(table){return Object.entries(table).map(([code,name])=>({id:code,name,code}))}function statusHelp(table){
|
|
6
6
|
return Object.entries(table).map(([code,name])=>`${code}\uFF08${name}\uFF09`).join(" / ")}function licenseForbidden(guidance){return body=>body?.error==="permission_denied"?guidance:void 0}function featureLicenseGuidance(feature){return`${feature}\u3092\u4F7F\u3046\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u30C6\u30CA\u30F3\u30C8\u304C${feature}\u3092\u5951\u7D04\u3057\u3066\u3044\u306A\u3044\u304B\u3001\u3042\u306A\u305F\u306E${feature}\u306E\u6A29\u9650\u304C\u300C\u306A\u3057\u300D\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002\u30C6\u30CA\u30F3\u30C8\u7BA1\u7406\u8005\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{salesFeatureDenied}from"./chunk-
|
|
3
|
+
import{salesFeatureDenied}from"./chunk-5STCZEOX.js";import{featureLicenseGuidance}from"./chunk-EQXJOEOK.js";import{repeatedValues}from"./chunk-RX5HWI4L.js";import{charCount,readBody}from"./chunk-M763HXDH.js";import{isExactNumericId}from"./chunk-M36DAHMH.js";import{ApiError}from"./chunk-JA5A6UJ2.js";import{LIST_PAGING_HELP,PAGE_NUMBER_LIST_FLAGS,envelopePaging,nonEmpty,positiveInteger}from"./chunk-MI6HVYR2.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";
|
|
4
4
|
import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiRejectedError,ApiResponseError,NetworkError,UsageError}from"./chunk-VFPY2A23.js";import{NotLoggedInError,SessionExpiredError}from"./chunk-XNLIEUAW.js";var SALES_PATH="/api/v2/sales";var REASONS_PATH=`${SALES_PATH}/ai-review-reasons`;function documentForbidden(body){if(salesFeatureDenied(body))return featureLicenseGuidance("\u8CA9\u58F2\u7BA1\u7406");const reason=body?.error;if(typeof reason==="string"&&reason.endsWith("\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093")){return`${reason}\uFF08\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B\u7D10\u3065\u304F\u66F8\u985E\u306F\u305D\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30E1\u30F3\u30D0\u30FC\u3001\u7D10\u3065\u304B\u306A\u3044\u66F8\u985E\u306F\u4F5C\u6210\u8005\u30FB\u62C5\u5F53\u8005\u3068\u7BA1\u7406\u8005\u3060\u3051\u304C\u6271\u3048\u307E\u3059\uFF09`}
|
|
5
5
|
return void 0}function reasonsForbidden(body){if(body?.error==="permission_denied")return featureLicenseGuidance("\u8CA9\u58F2\u7BA1\u7406");return"\u7406\u7531\u306E\u6A2A\u65AD\u4E00\u89A7\u30FB\u6587\u6848\u751F\u6210\u30FBPR \u4F5C\u6210\u306F\u8CA9\u58F2\u7BA1\u7406\u306E\u7BA1\u7406\u8005\u3060\u3051\u304C\u4F7F\u3048\u307E\u3059\uFF08\u66F8\u985E\u3092\u8DE8\u3044\u3067\u7406\u7531\u3092\u8AAD\u3080\u305F\u3081\uFF09\u3002\u30C6\u30CA\u30F3\u30C8\u304C\u8CA9\u58F2\u7BA1\u7406\u3092\u5951\u7D04\u3057\u3066\u3044\u308B\u304B\u30FB\u3042\u306A\u305F\u306E\u8CA9\u58F2\u7BA1\u7406\u306E\u6A29\u9650\u304C\u300C\u7BA1\u7406\u8005\u300D\u304B\u3092\u30C6\u30CA\u30F3\u30C8\u7BA1\u7406\u8005\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}
|
|
6
6
|
var ESTIMATE={name:"estimate",label:"\u898B\u7A4D",segment:"estimates"};var INVOICE={name:"invoice",label:"\u8ACB\u6C42",segment:"invoices"};var CONTRACT={name:"contract",label:"\u53D6\u5F15\u5951\u7D04",segment:"contracts"};var JUDGMENTS={no_issue:"\u78BA\u8A8D\u3057\u305F\u304C\u554F\u984C\u306A\u3044\u3068\u5224\u65AD\u3057\u305F",corrected:"\u6307\u6458\u3092\u53D7\u3051\u3066\u66F8\u985E\u3092\u4FEE\u6B63\u3057\u305F",not_applicable:"\u3053\u306E\u6848\u4EF6\u306B\u306F\u5F53\u3066\u306F\u307E\u3089\u306A\u3044\u6307\u6458\u3060\u3068\u5224\u65AD\u3057\u305F"};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{USER_REF_FLAG,USER_REF_HELP}from"./chunk-UVCJXHWN.js";import{readBody}from"./chunk-
|
|
3
|
+
import{USER_REF_FLAG,USER_REF_HELP}from"./chunk-UVCJXHWN.js";import{readBody}from"./chunk-M763HXDH.js";import{isSafePathSegment}from"./chunk-HVZUXLQ4.js";import{nonEmpty}from"./chunk-MI6HVYR2.js";import{requireResolved,singleRef,withResolved}from"./chunk-PS5QFKHB.js";import{isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";var ORG="/api/v2/organization";var PERIODS_PATH=`${ORG}/evaluation-periods`;var EVALUATIONS_PATH=`${ORG}/evaluations`;var GOAL_SHEETS_PATH=`${ORG}/goal-sheets`;var EVALUATION_FORBIDDEN="\u3053\u306E\u8A55\u4FA1\u3092\u8AAD\u3080\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u8A55\u4FA1\u3092\u8AAD\u3081\u308B\u306E\u306F\u8A55\u4FA1\u5BFE\u8C61\u8005\u672C\u4EBA\u30FB\u8A55\u4FA1\u8005\uFF08\u4E0A\u9577\u306E\u8A55\u4FA1\u30C1\u30A7\u30FC\u30F3\uFF09\u30FB\u30AA\u30D6\u30B6\u30FC\u30D0\u30FC\u30FB\u4EBA\u4E8B\u7BA1\u7406\u306E\u7BA1\u7406\u8005\u3060\u3051\u3067\u3059\u3002\u81EA\u5206\u304C\u8A55\u4FA1\u8005\u3068\u3057\u3066\u6301\u3064\u8A55\u4FA1\u306F twp evaluation subordinates --period <\u8A55\u4FA1\u671F\u9593ID> \u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059";
|
|
4
4
|
function forbiddenOnly(guidance){return body=>body?.error==="forbidden"?guidance:void 0}var SENSITIVE="\u4EBA\u4E8B\u8A55\u4FA1\u30FB\u76EE\u6A19\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u306E\u672C\u6587\u3092\u542B\u3080";var GOAL_SHEET_FORBIDDEN="\u3053\u306E\u76EE\u6A19\u30B7\u30FC\u30C8\u3092\u8AAD\u3080\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u76EE\u6A19\u30B7\u30FC\u30C8\u3092\u8AAD\u3081\u308B\u306E\u306F\u672C\u4EBA\u30FB\u8A55\u4FA1\u8005\uFF08\u4E0A\u9577\u306E\u8A55\u4FA1\u30C1\u30A7\u30FC\u30F3\uFF09\u30FB\u30AA\u30D6\u30B6\u30FC\u30D0\u30FC\u30FB\u4EBA\u4E8B\u7BA1\u7406\u306E\u7BA1\u7406\u8005\u3060\u3051\u3067\u3059\u3002\u90E8\u4E0B\u306E\u76EE\u6A19\u30B7\u30FC\u30C8\u306F twp goal-sheet list --period <\u8A55\u4FA1\u671F\u9593ID> \u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059";
|
|
5
5
|
function singleId(input,command,label,listHint){const[raw,...rest]=input.args;const id=raw?.trim()??"";if(id==="")throw new UsageError(`${label}\u306E ID \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044`,`twp ${command} help`);if(rest.length>0)throw new UsageError(`${command} \u304C\u53D7\u3051\u53D6\u308C\u308B${label}\u306E ID \u306F1\u3064\u3060\u3051\u3067\u3059: ${rest.join(" ")}`,`twp ${command} help`);if(!isSafePathSegment(id))throw new UsageError(`${label}\u306E ID \u3068\u3057\u3066\u4F7F\u3048\u306A\u3044\u5024\u3067\u3059: ${id}`,
|
|
6
6
|
listHint);return id}function envelope(body,what){if(!isRecord(body)||body["result"]!==true){throw new ApiResponseError(`${what}\u306E\u5FDC\u7B54\u306E\u5F62\u304C\u60F3\u5B9A\u3068\u9055\u3044\u307E\u3059\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`)}return body}function objectOf(body,what,key){const row=envelope(body,what)[key];if(!isRecord(row)||typeof row["id"]!=="string"){throw new ApiResponseError(`${what}\u306E\u5FDC\u7B54\u306B ${key} \u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{parseCsvRecords}from"./chunk-7PTFN3H7.js";import{readCsvFileText}from"./chunk-QLENN5DD.js";import{cacheNote,createFlags,fieldBody,hasAnyField,idSegment,masterItem,masterRows,targetId,updateFlags}from"./chunk-
|
|
3
|
+
import{parseCsvRecords}from"./chunk-7PTFN3H7.js";import{readCsvFileText}from"./chunk-QLENN5DD.js";import{cacheNote,createFlags,fieldBody,hasAnyField,idSegment,masterItem,masterRows,targetId,updateFlags}from"./chunk-MPGJU5A7.js";import{repeatedValues}from"./chunk-RX5HWI4L.js";import{charCount,readBody}from"./chunk-M763HXDH.js";import{QUALIFICATIONS_PATH,SKILLS_PATH,SKILL_CATEGORIES_PATH,resolveNamed}from"./chunk-M36DAHMH.js";import{ULID_RE,isSafePathSegment}from"./chunk-HVZUXLQ4.js";
|
|
4
4
|
import{ApiError,MultipartBody}from"./chunk-JA5A6UJ2.js";import{nonEmpty}from"./chunk-MI6HVYR2.js";import{requireResolved,withResolved}from"./chunk-PS5QFKHB.js";import{acknowledgement,isRecord,pick}from"./chunk-3ZRMMBP5.js";import{ApiRejectedError,ApiResponseError,UsageError}from"./chunk-VFPY2A23.js";import fs from"fs";import path from"path";var GROUPED_PATH="/api/v2/organization/skills/grouped";var SKILL_MAP_PATH="/api/v2/organization/skill-map";var USERS_LIST_PATH="/api/v2/admin/users/list";var USERS_PAGE_LIMIT=100;var USERS_MAX_PAGES=50;var HR_FORBIDDEN="HR\u7BA1\u7406\u8005\u306E\u6A29\u9650\u304C\u5FC5\u8981\u3067\u3059\u3002\u30B9\u30AD\u30EB\u30DE\u30C3\u30D7\uFF08twp skill map / who\uFF09\u306F\u4EBA\u4E8B\u7BA1\u7406\u306E\u7BA1\u7406\u8005\u3060\u3051\u304C\u53C2\u7167\u3067\u304D\u307E\u3059";function groupedSkillRows(body){
|
|
5
5
|
const categories=isRecord(body)?body["categories"]:void 0;if(!Array.isArray(categories)){throw new ApiResponseError("\u30B9\u30AD\u30EB\u4E00\u89A7\u306E\u5FDC\u7B54\u306B categories \u914D\u5217\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}return categories.flatMap(group=>{const category=isRecord(group)&&isRecord(group["category"])?group["category"]:{};const skills=isRecord(group)&&Array.isArray(group["skills"])?group["\
|
|
6
6
|
skills"]:[];return skills.filter(isRecord).map(skill=>({...skill,category_id:skill["category_id"]??category["id"]??null,category_name:category["name"]??null}))})}function groupedCategories(body){groupedSkillRows(body);return body["categories"]}function skillMatrix(body){const matrix=isRecord(body)?body["matrix"]:void 0;if(!Array.isArray(matrix)){throw new ApiResponseError("\u30B9\u30AD\u30EB\u30DE\u30C3\u30D7\u306E\u5FDC\u7B54\u306B matrix \u914D\u5217\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u63A5\u7D9A\u5148\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __twpCreateRequire } from 'node:module';
|
|
2
2
|
const require = __twpCreateRequire(import.meta.url);
|
|
3
|
-
import{isModeId,isPermissionModeId}from"./chunk-2LOT54OO.js";import{API_TOKEN,HELP_TOKEN,isDomainName}from"./chunk-
|
|
3
|
+
import{isModeId,isPermissionModeId}from"./chunk-2LOT54OO.js";import{API_TOKEN,HELP_TOKEN,isDomainName}from"./chunk-C6U2CGX7.js";import{BOOLEAN_FLAGS,dispatch,resolveRoute,rewriteQueueCommand}from"./chunk-EOXTDZTA.js";import{splitFlagToken}from"./chunk-QQRJLH6B.js";var GLOBAL_FLAGS=new Set(["-h","--help","-v","--version","--profile","--output","--query","--dry-run","--debug","--yes","-y","--refresh"]);function parseArgv(rawArgv){const out={command:"tui",safe:false,daemon:false,forceRunner:false,stopForce:false,logoutForce:false,stopDrain:false,noTui:false,doctor:false,yes:false,skillAll:false,includeStopped:false,planEmpty:false,planCheck:false,noAiConfigFile:false,verbose:false,loginMethod:"browser",loginNoBrowser:false,promptFromStdin:false,domainArgv:[],
|
|
4
4
|
domainHelp:false,dryRun:false,debug:false,refresh:false,unknown:[],allowedTools:[],disallowedTools:[]};const queue=rewriteQueueCommand(rawArgv);if(queue.moved!==void 0){out.movedCommand=queue.moved;return out}const argv=queue.argv;const route=resolveRoute(dispatch(argv));const consumed=new Set;const[firstIndex,secondIndex]=route.consumed;if(route.kind==="builtin"){out.command=route.command;if(route.action!==void 0)out.taskLoopAction=route.action;for(const index of route.consumed)consumed.add(index)}else if(route.
|
|
5
5
|
kind==="domain"){if(route.domain===HELP_TOKEN){if(route.operation===void 0){out.command="help";if(firstIndex!==void 0)consumed.add(firstIndex)}else if(isDomainName(route.operation)){out.command="domain";out.domain=route.operation;out.domainHelp=true;if(firstIndex!==void 0)consumed.add(firstIndex);if(secondIndex!==void 0)consumed.add(secondIndex)}else if(route.operation===API_TOKEN){out.command="api";out.domainHelp=true;if(firstIndex!==void 0)consumed.add(firstIndex);if(secondIndex!==void 0)consumed.
|
|
6
6
|
add(secondIndex)}}else if(route.domain===API_TOKEN){out.command="api";if(firstIndex!==void 0)consumed.add(firstIndex)}else if(isDomainName(route.domain)){out.command="domain";out.domain=route.domain;if(route.operation!==void 0)out.operation=route.operation;for(const index of route.consumed)consumed.add(index)}}const hasSubcommandToken=route.kind==="builtin"||route.kind==="domain"&&(route.domain===HELP_TOKEN||route.domain===API_TOKEN||isDomainName(route.domain));const isDomainRoute=out.command===
|